/* ==========================================================================
   PakGunMath — Official Website Stylesheet
   Modern, Clean, Mobile-First, Accessible, and Lightweight
   ========================================================================== */

:root {
  --brand-primary: #1e3a8a;       /* Deep Royal Navy */
  --brand-primary-dark: #172554;
  --brand-primary-light: #3b82f6;
  --brand-accent: #0284c7;        /* Sky Blue */
  --brand-accent-teal: #0d9488;   /* Knowledge Teal */
  --brand-warm: #d97706;          /* Warm Amber */
  --brand-warm-light: #fef3c7;
  
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  
  --text-main: #0f172a;           /* Slate 900 */
  --text-muted: #475569;          /* Slate 600 */
  --text-light: #64748b;          /* Slate 500 */
  --border-color: #e2e8f0;
  --border-focus: #38bdf8;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-hover: 0 20px 25px -5px rgb(30 58 138 / 0.1), 0 8px 10px -6px rgb(30 58 138 / 0.05);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-accent);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--brand-primary);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.container-narrow {
  max-width: 860px;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-link img {
  height: 42px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 4px;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 4px;
  right: 4px;
  height: 2px;
  background-color: var(--brand-primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-main);
}

.mobile-nav-toggle:focus {
  outline: 2px solid var(--brand-accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--brand-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--brand-primary) !important;
  border-color: #cbd5e1;
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: var(--brand-primary-light);
  transform: translateY(-1px);
}

.btn-accent {
  background-color: var(--brand-accent);
  color: #ffffff !important;
}

.btn-accent:hover {
  background-color: #0369a1;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-disabled,
.btn[aria-disabled="true"] {
  background-color: #e2e8f0;
  color: #94a3b8 !important;
  border-color: #cbd5e1;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Tagline badge */
.tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--brand-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.tagline-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-accent);
}

/* Sections General */
section {
  padding: 72px 0;
}

.section-bg-alt {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 1. Hero Section */
.hero-section {
  padding: 60px 0 80px 0;
  background: radial-gradient(circle at 10% 20%, rgba(239, 246, 255, 0.7) 0%, rgba(248, 250, 252, 1) 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.18;
  color: var(--brand-primary);
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero-subheadline {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.hero-visual {
  position: relative;
}

.hero-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-badge-float {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: #fef3c7;
  color: #92400e;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid #fde68a;
}

.hero-illustration-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-illustration-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 2. Problem Section */
.problem-card-box {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-left: 6px solid #f97316;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.problem-card-box h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #9a3412;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.problem-card-box p {
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 14px;
}

.problem-card-box p:last-child {
  margin-bottom: 0;
  font-weight: 600;
  color: var(--brand-primary);
}

.problem-grid-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.problem-pill {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #9a3412;
  font-weight: 600;
}

/* 3. Philosophy Section */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.philosophy-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.philosophy-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.philosophy-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: #eff6ff;
  color: var(--brand-primary);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.philosophy-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 12px;
}

.philosophy-card p {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.philosophy-statement {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 24px 32px;
  text-align: center;
}

.philosophy-statement p {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1.6;
}

/* 4. Products Section */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.product-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  width: fit-content;
}

.badge-app {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-ebook {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.product-card h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.3;
  margin-bottom: 12px;
}

.product-card .product-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.product-card .topic-box {
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.topic-box h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.topic-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.topic-list li::before {
  content: '✓';
  color: var(--brand-accent-teal);
  font-weight: 800;
  font-size: 0.85rem;
}

.product-card .benefit-callout {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-primary);
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.product-card .card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* 5. Why Section */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.why-grid .why-card:nth-child(4),
.why-grid .why-card:nth-child(5) {
  grid-column: span 1;
}

.why-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.why-icon {
  font-size: 1.5rem;
  margin-bottom: 16px;
  display: inline-block;
}

.why-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 10px;
}

.why-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 6. Audience Section */
.audience-wrapper {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.audience-wrapper h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 16px;
  text-align: center;
}

.audience-wrapper .intro-p {
  text-align: center;
  font-size: 1.1rem;
  color: #bfdbfe;
  max-width: 640px;
  margin: 0 auto 36px auto;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.audience-item {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.audience-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #38bdf8;
  color: #0f172a;
  font-weight: 800;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.audience-item p {
  font-size: 0.98rem;
  color: #f8fafc;
  line-height: 1.5;
}

/* 7. About Teaser */
.about-teaser-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
  max-width: 900px;
  margin: 0 auto;
}

.about-teaser-card h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 20px;
}

.about-teaser-card p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.about-teaser-card p strong {
  color: var(--text-main);
}

.about-teaser-actions {
  margin-top: 28px;
}

/* 9. Final CTA */
.final-cta-section {
  background: radial-gradient(circle at 50% 50%, #eff6ff 0%, #dbeafe 100%);
  border-top: 1px solid #bfdbfe;
  text-align: center;
  padding: 80px 0;
}

.final-cta-content {
  max-width: 720px;
  margin: 0 auto;
}

.final-cta-content h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.final-cta-content p {
  font-size: 1.15rem;
  color: #334155;
  line-height: 1.65;
  margin-bottom: 32px;
}

.final-cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Detail & Inner Pages */
.page-header {
  padding: 56px 0 36px 0;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.2;
  margin-bottom: 14px;
}

.page-header .page-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.65;
}

.article-content {
  padding: 56px 0;
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-primary);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 28px;
  margin-bottom: 12px;
}

.article-content p {
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.75;
  margin-bottom: 18px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-content li {
  font-size: 1.02rem;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 8px;
}

.info-banner {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-accent);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 28px 0;
}

.info-banner p {
  margin-bottom: 0 !important;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: #0f172a;
  color: #94a3b8;
  padding: 64px 0 32px 0;
  border-top: 1px solid #1e293b;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-brand .footer-tagline {
  color: #38bdf8;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.92rem;
  color: #94a3b8;
}

.footer-col a:hover {
  color: #38bdf8;
}

.social-placeholder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-pill {
  font-size: 0.78rem;
  color: #cbd5e1;
  background-color: #1e293b;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.88rem;
  color: #64748b;
}

.footer-bottom p {
  margin: 0;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-content h1 {
    font-size: 2.3rem;
  }
  
  .products-grid,
  .philosophy-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }
  
  .problem-grid-highlights {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-wrapper {
    height: 64px;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .main-nav.is-open {
    display: flex;
  }
  
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }
  
  .nav-links a {
    width: 100%;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .nav-links a.active::after {
    display: none;
  }
  
  .nav-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-actions .btn {
    width: 100%;
  }
  
  .hero-content h1 {
    font-size: 1.95rem;
  }
  
  .section-title {
    font-size: 1.7rem;
  }
  
  .audience-wrapper {
    padding: 32px 20px;
  }
  
  .about-teaser-card {
    padding: 28px 20px;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
  }
}
