/* =========================================================
   pages.css — layout for standalone subpages
   (course, about, enroll, blog, blog posts)

   The homepage uses .snap-section (height:100vh) plus .fade-up
   (opacity:0 until .is-visible is applied by the scroll observer).
   Subpages are long-form documents, so they use their own
   scrolling layout and never depend on those classes.
   ========================================================= */

.page-body {
  background: #ffffff;
  color: #1f2937;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Header bar ===== */
.page-header {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #ece8f6;
}

.page-header-logo img {
  display: block;
  height: 40px;
  width: auto;
}

/* ===== Desktop nav ===== */
.page-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.page-nav a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-nav a:hover {
  color: #7c3aed;
}

.page-nav a[aria-current="page"] {
  color: #7c3aed;
}

.page-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: #7c3aed;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.34);
}

/* ===== Mobile nav toggle ===== */
.page-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e5e0f5;
  border-radius: 12px;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
}

.page-mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.5rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid #ece8f6;
}

.page-mobile-nav.open {
  display: flex;
}

.page-mobile-nav a {
  padding: 0.75rem 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: #374151;
  text-decoration: none;
  border-bottom: 1px solid #f3f0fb;
}

.page-mobile-nav a:last-child {
  border-bottom: none;
}

@media (min-width: 900px) {
  .page-header {
    padding: 1.1rem 3rem;
  }

  .page-nav {
    display: flex;
  }

  .page-nav-toggle,
  .page-mobile-nav {
    display: none !important;
  }
}

/* ===== Shared containers ===== */
.page-main {
  display: block;
}

.page-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-container--narrow {
  max-width: 760px;
}

.page-section {
  padding: 3.5rem 0;
}

@media (min-width: 900px) {
  .page-section {
    padding: 4.5rem 0;
  }
}

/* ===== Hero ===== */
.page-hero {
  padding: 3rem 0 2.5rem;
  background: linear-gradient(135deg, #f8f5ff 0%, #f2ecff 55%, #fdfbff 100%);
  border-bottom: 1px solid #eee9fa;
}

.page-eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7c3aed;
}

.page-title {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #16112b;
}

.page-title .accent {
  color: #7c3aed;
}

.page-lede {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: #52525b;
}

/* ===== Breadcrumbs ===== */
.page-breadcrumb {
  padding: 1rem 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.page-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-breadcrumb a {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
}

.page-breadcrumb a:hover {
  text-decoration: underline;
}

.page-breadcrumb [aria-hidden="true"] {
  color: #c4b5fd;
}

/* ===== Typography for long-form content ===== */
.page-prose h2 {
  margin: 2.5rem 0 1rem;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  color: #16112b;
  letter-spacing: -0.01em;
}

.page-prose h3 {
  margin: 1.9rem 0 0.75rem;
  font-size: clamp(1.15rem, 1.9vw, 1.35rem);
  font-weight: 800;
  color: #241a45;
}

.page-prose p,
.page-prose li {
  font-size: 1.03rem;
  line-height: 1.75;
  color: #3f3f52;
}

.page-prose p {
  margin: 0 0 1.1rem;
}

.page-prose ul,
.page-prose ol {
  margin: 0 0 1.4rem;
  padding-left: 1.4rem;
}

.page-prose li {
  margin-bottom: 0.55rem;
}

.page-prose a {
  color: #6d28d9;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-prose a:hover {
  color: #4c1d95;
}

.page-prose strong {
  color: #241a45;
  font-weight: 800;
}

/* Callout box */
.page-callout {
  margin: 1.75rem 0;
  padding: 1.25rem 1.4rem;
  border-left: 4px solid #7c3aed;
  border-radius: 0 12px 12px 0;
  background: #f7f3ff;
}

.page-callout p {
  margin: 0;
  color: #3b2a63;
}

/* ===== Table of contents ===== */
.page-toc {
  margin: 2rem 0;
  padding: 1.35rem 1.5rem;
  border: 1px solid #ece8f6;
  border-radius: 14px;
  background: #fcfaff;
}

.page-toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #6b7280;
}

.page-toc ol {
  margin: 0;
  padding-left: 1.2rem;
}

.page-toc li {
  margin-bottom: 0.4rem;
  font-size: 0.97rem;
}

/* ===== Card grids ===== */
.page-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .page-grid--2,
  .page-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .page-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.page-card {
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
  border: 1px solid #ece8f6;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(24, 16, 48, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(24, 16, 48, 0.09);
}

.page-card-num {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #a78bfa;
}

.page-card h3 {
  margin: 0.6rem 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #16112b;
}

.page-card p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #55556b;
}

/* ===== Stats ===== */
.page-stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .page-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.page-stat {
  padding: 1.25rem;
  border-radius: 14px;
  background: #f8f5ff;
  text-align: center;
}

.page-stat strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: #5b21b6;
}

.page-stat span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

/* ===== Buttons ===== */
.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.9rem;
  border: none;
  border-radius: 999px;
  background: #7c3aed;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(124, 58, 237, 0.36);
}

.page-btn--ghost {
  background: #ffffff;
  color: #6d28d9;
  border: 2px solid #ddd0fb;
  box-shadow: none;
}

.page-btn--ghost:hover {
  border-color: #7c3aed;
  box-shadow: none;
}

/* ===== CTA band ===== */
.page-cta {
  margin: 0;
  padding: 3rem 0;
  background: linear-gradient(135deg, #2e1065 0%, #5b21b6 60%, #7c3aed 100%);
  color: #ffffff;
  text-align: center;
}

.page-cta h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 900;
  color: #ffffff;
}

.page-cta p {
  margin: 0 auto 1.8rem;
  max-width: 55ch;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #e6dcff;
}

.page-cta .page-btn {
  background: #ffffff;
  color: #5b21b6;
}

/* ===== FAQ ===== */
.page-faq-item {
  padding: 1.15rem 0;
  border-bottom: 1px solid #ece8f6;
}

.page-faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #16112b;
}

.page-faq-item p {
  margin: 0;
  line-height: 1.7;
  color: #4b4b5f;
}

/* ===== Blog listing ===== */
.page-post-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid #ece8f6;
  border-radius: 16px;
  background: #ffffff;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-post-card:hover {
  transform: translateY(-3px);
  border-color: #ddd0fb;
  box-shadow: 0 14px 30px rgba(24, 16, 48, 0.09);
}

.page-post-tag {
  align-self: flex-start;
  margin-bottom: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #f3ebff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6d28d9;
}

.page-post-card h2,
.page-post-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
  color: #16112b;
}

.page-post-card p {
  margin: 0 0 1rem;
  font-size: 0.97rem;
  line-height: 1.6;
  color: #55556b;
}

.page-post-meta {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: #8b8ba0;
}

/* ===== Article meta ===== */
.page-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: #6b7280;
}

.page-article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ===== Forms ===== */
.page-form {
  display: grid;
  gap: 1.1rem;
  padding: 1.75rem;
  border: 1px solid #ece8f6;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(24, 16, 48, 0.06);
}

.page-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.page-field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #374151;
}

.page-field input,
.page-field select,
.page-field textarea {
  padding: 0.8rem 0.95rem;
  border: 1px solid #ded8f0;
  border-radius: 10px;
  background: #fdfcff;
  font-family: inherit;
  font-size: 1rem;
  color: #1f2937;
}

.page-field input:focus,
.page-field select:focus,
.page-field textarea:focus {
  outline: 3px solid rgba(124, 58, 237, 0.25);
  outline-offset: 1px;
  border-color: #7c3aed;
}

.page-field-hint {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ===== Footer ===== */
.page-footer {
  padding: 2.5rem 0;
  background: #16112b;
  color: #c7c2dd;
}

.page-footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .page-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.page-footer h2 {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffffff;
}

.page-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-footer li {
  margin-bottom: 0.55rem;
}

.page-footer a {
  color: #c7c2dd;
  font-size: 0.95rem;
  text-decoration: none;
}

.page-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.page-footer-note {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2c2348;
  font-size: 0.85rem;
  color: #8f89ab;
}

/* ===== Accessibility ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 8px;
  background: #7c3aed;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.page-skip-link:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .page-card,
  .page-btn,
  .page-post-card,
  .page-nav-cta {
    transition: none;
  }
}
