/* ==========================================================================
   AI Study Guru — Professional 4K UHD & 3D Design System (v2.0)
   Balanced Typography · High-Contrast Buttons · Clean Modern Architecture
   ========================================================================== */

/* ── Typography & Proportional Scale System (Eliminates Oversized Text) ──── */
h1, .hero-headline {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.025em !important;
  color: #0f172a !important;
  margin-bottom: 0.85rem !important;
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem) !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
  color: #0f172a !important;
  margin-bottom: 0.6rem !important;
}

h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #0f172a !important;
  margin-bottom: 0.45rem !important;
}

p.lead, .sg-lead {
  font-size: 1.02rem !important;
  line-height: 1.6 !important;
  color: #475569 !important;
  margin-bottom: 1.35rem !important;
  max-width: 660px !important;
}

/* ── Hero Kicker Pill ──────────────────────────────────────────────────── */
.hero-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 82, 255, 0.08);
  border: 1px solid rgba(0, 82, 255, 0.2);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0052ff;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.kicker-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ── Animated Aurora Gradient Text ─────────────────────────────────────── */
.gradient, .sg-hero h1 .gradient {
  background: linear-gradient(
    270deg,
    #0052ff 0%,
    #4f46e5 25%,
    #7c3aed 50%,
    #0284c7 75%,
    #0052ff 100%
  ) !important;
  background-size: 250% 250% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  animation: gradientFlow 6s ease infinite !important;
  display: inline !important;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Professional Unified Channel Action Buttons (High Contrast) ───────── */
.hero-channel-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 1.25rem;
  margin-bottom: 1.15rem;
}

@media (max-width: 860px) {
  .hero-channel-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.channel-btn {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 11px 13px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  position: relative !important;
  overflow: hidden !important;
}

.channel-btn:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.05) !important;
}

.channel-btn.btn-web {
  background: linear-gradient(135deg, #0052ff 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 82, 255, 0.35) !important;
}

.channel-btn.btn-tg {
  background: linear-gradient(135deg, #0284c7 0%, #0088cc 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.35) !important;
}

.channel-btn.btn-wa {
  background: linear-gradient(135deg, #15803d 0%, #25D366 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
}

.channel-btn .btn-icon {
  font-size: 1.25rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  width: 24px !important;
  height: 24px !important;
}

.channel-btn .btn-text {
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
  line-height: 1.2 !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.channel-btn .btn-text strong {
  font-size: 0.88rem !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.channel-btn .btn-text small {
  font-size: 0.72rem !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.channel-btn .btn-arrow {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  margin-left: auto !important;
}

.channel-btn .btn-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  text-transform: uppercase !important;
  margin-left: auto !important;
}

/* ── Sleek Single-Line Trust Ribbon ────────────────────────────────────── */
.hero-trust-ribbon {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px 12px !important;
  font-size: 0.8rem !important;
  color: #475569 !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  background: rgba(248, 250, 252, 0.95) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  margin-top: 10px !important;
}

.hero-trust-ribbon span {
  display: inline-flex !important;
  align-items: center !important;
  color: #334155 !important;
}

.hero-trust-ribbon .ribbon-dot {
  color: #cbd5e1 !important;
  font-weight: 800 !important;
}

/* ── Button Contrast & Color Fixes (No White Buttons Anywhere) ─────────── */
.btn-primary {
  background: linear-gradient(135deg, #0052ff 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(0, 82, 255, 0.35) !important;
  border: none !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #003ecc 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 82, 255, 0.45) !important;
}

.btn-outline {
  color: #0052ff !important;
  background: #ffffff !important;
  border: 1.5px solid #0052ff !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.btn-outline:hover {
  background: #eff6ff !important;
  color: #003ecc !important;
  border-color: #003ecc !important;
  transform: translateY(-1px) !important;
}

.pg-final .btn-outline {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
}

.pg-final .btn-outline:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

/* ── Join3D Buttons Full Visibility (Fixes Invisible White-on-White) ────── */
.join3d {
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
}

.join3d strong {
  color: #ffffff !important;
  font-size: 0.98rem !important;
}

.join3d small {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.78rem !important;
}

.join3d-tg, .join3d-tg-featured {
  background: linear-gradient(135deg, #0284c7 0%, #0088cc 100%) !important;
  box-shadow: 0 8px 22px rgba(0, 136, 204, 0.4) !important;
}

.join3d-web {
  background: linear-gradient(135deg, #0052ff 0%, #2563eb 100%) !important;
  box-shadow: 0 8px 22px rgba(0, 82, 255, 0.4) !important;
}

.join3d-wa {
  background: linear-gradient(135deg, #15803d 0%, #25D366 100%) !important;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4) !important;
}

.join3d:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.06) !important;
}

/* ── Hero Chips (High Contrast, Professional Pills) ────────────────────── */
.hero-chip-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border-radius: 20px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  transition: all 0.18s ease !important;
}

.hero-chip-btn:hover {
  background: #0052ff !important;
  color: #ffffff !important;
  border-color: #0052ff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.25) !important;
}

/* ── Live Simulator Action Buttons (Crisp & Distinct) ──────────────────── */
.btn-demo-try {
  background: #0052ff !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 8px 14px !important;
  font-size: 0.8rem !important;
  box-shadow: 0 4px 12px rgba(0, 82, 255, 0.25) !important;
}

.btn-demo-try:hover {
  background: #003ecc !important;
  color: #ffffff !important;
}

.btn-demo-tg {
  background: #0088cc !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 8px 14px !important;
  font-size: 0.8rem !important;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.25) !important;
}

.btn-demo-tg:hover {
  background: #0077b5 !important;
  color: #ffffff !important;
}

.btn-demo-wa {
  background: #25D366 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 8px 14px !important;
  font-size: 0.8rem !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25) !important;
}

.btn-demo-wa:hover {
  background: #20ba59 !important;
  color: #ffffff !important;
}

/* ── Global Telegram & WhatsApp Hero Buttons ───────────────────────────── */
.btn-tg-hero {
  background: linear-gradient(135deg, #0088cc 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.35) !important;
  border-radius: 999px !important;
  padding: 12px 24px !important;
}

.btn-tg-hero:hover {
  background: linear-gradient(135deg, #0077b5 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(0, 136, 204, 0.45) !important;
}

.btn-wa-hero {
  background: #25D366 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
  border-radius: 999px !important;
  padding: 10px 20px !important;
}

.btn-wa-hero:hover {
  background: #20ba59 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.45) !important;
}

/* ── Glassmorphism & 3D Card Shadows ───────────────────────────────────── */
.sg-card,
.topper-card-home,
.channel-pill-card,
article.card {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.sg-card:hover,
.topper-card-home:hover,
.channel-pill-card:hover,
article.card:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 32px -4px rgba(0, 82, 255, 0.1), 0 4px 12px rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(0, 82, 255, 0.2) !important;
}

/* ── Hero Live Simulator Card ──────────────────────────────────────────── */
.hero-ai-demo-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 40px -10px rgba(0, 82, 255, 0.12), 0 8px 20px rgba(15, 23, 42, 0.05) !important;
}

/* ── Solver Input Professional Design ──────────────────────────────────── */
.sg-home-solver .solver-input-wrap {
  background: #ffffff !important;
  border: 2px solid #0052ff !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 18px rgba(0, 82, 255, 0.1) !important;
}

.sg-home-solver input {
  font-size: 0.95rem !important;
  color: #0f172a !important;
}

.btn-solver-submit {
  background: linear-gradient(135deg, #0052ff 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 10px 18px !important;
}

.btn-solver-submit:hover {
  background: linear-gradient(135deg, #003ecc 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
}

/* ── 4K UHD Micro-Lighting Specular Spotlights ──────────────────────────── */
.pg-tilt::after, 
.sg-card::after, 
.hero-ai-demo-card::after, 
.topper-card-home::after, 
.channel-pill-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    380px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.4),
    rgba(0, 82, 255, 0.04) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 3;
}

.pg-tilt:hover::after, 
.sg-card:hover::after, 
.hero-ai-demo-card:hover::after, 
.topper-card-home:hover::after, 
.channel-pill-card:hover::after {
  opacity: 1;
}

/* ── Button Click Ripple ───────────────────────────────────────────────── */
.btn-ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: rippleAnim 0.6s cubic-bezier(0.1, 0.8, 0.3, 1);
  pointer-events: none;
  z-index: 10;
}

@keyframes rippleAnim {
  to {
    transform: scale(3.5);
    opacity: 0;
  }
}

/* ── Reduced Motion Respect ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
