/* ============================================================
   documentation.css
   LanguageLab – Documentation Page Styles
   ============================================================ */


/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Brand palette */
  --clr-primary: #7C3AED;
  /* Violet 700  */
  --clr-primary-light: #A78BFA;
  /* Violet 400  */
  --clr-primary-bg: #EDE9FE;
  /* Violet 100  */

  --clr-accent-yellow: #F59E0B;
  /* Amber 500   */
  --clr-accent-yellow-bg: #FEF3C7;
  /* Amber 100   */
  --clr-accent-amber: #D97706;
  /* Amber 600   */
  --clr-accent-amber-bg: #FDE68A;
  /* Amber 200   */
  --clr-accent-violet: #6D28D9;
  /* Violet 700  */

  /* Neutrals */
  --clr-bg: #F3F4F8;
  /* Page background  */
  --clr-surface: #FFFFFF;
  /* Card / panel     */
  --clr-border: #E5E7EB;
  /* Subtle lines      */

  --clr-text-primary: #111827;
  /* Gray 900         */
  --clr-text-secondary: #6B7280;
  /* Gray 500         */
  --clr-text-muted: #9CA3AF;
  /* Gray 400         */

  /* CTA section */
  --clr-cta-bg: #F5F3FF;
  /* Violet 50        */

  /* Typography */
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body: 'DM Sans', 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .07);
  --shadow-hover: 0 4px 12px rgba(124, 58, 237, .14), 0 12px 32px rgba(0, 0, 0, .10);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(.4, 0, .2, 1);

  /* Layout */
  --max-width: 1100px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--ff-body);
  background-color: var(--clr-bg);
  color: var(--clr-text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img,
svg {
  display: block;
}


.top-navbar {
  position: sticky;
  top: 0;
  width: 100%;
  height: 70px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  z-index: 9999;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-primary);
}

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

@media (max-width: 768px) {
  .nav-logo img {
    height: 34px;
  }
}

#themeToggle {
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0,0,0,.05);
}

/* ============================================================
   3. LAYOUT UTILITY
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-xl);
}


/* ============================================================
   4. HEADER
   ============================================================ */
.site-header {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
  text-align: center;

}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  max-width: var(--max-width);
  margin-inline: auto;
}

/* Logo */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  box-shadow: var(--shadow-card);
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-family: var(--ff-body);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--clr-text-primary);
  letter-spacing: -0.01em;
}

.logo-text strong {
  font-weight: 700;
  color: var(--clr-primary);
}

/* Page title */
.page-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  color: var(--clr-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}


/* ============================================================
   5. DOCUMENTATION CARDS
   ============================================================ */
.doc-cards-section {
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.doc-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* Individual card */
.doc-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.doc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--clr-primary-light);
}

/* Icon bubbles */
.doc-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.doc-card__icon--yellow {
  background: var(--clr-accent-yellow-bg);
  color: var(--clr-accent-yellow);
}

.doc-card__icon--purple {
  background: var(--clr-primary-bg);
  color: var(--clr-primary);
}

.doc-card__icon--amber {
  background: var(--clr-accent-amber-bg);
  color: var(--clr-accent-amber);
}

.doc-card__icon--violet {
  background: var(--clr-primary-bg);
  color: var(--clr-accent-violet);
}

/* Card title */
.doc-card__title {
  font-family: var(--ff-body);
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--clr-text-primary);
  letter-spacing: -0.01em;
}

/* Card list */
.doc-card__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.doc-card__list li {
  position: relative;
  padding-left: var(--space-md);
  font-size: 0.825rem;
  color: var(--clr-text-secondary);
  line-height: 1.55;
}

.doc-card__list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--clr-text-muted);
}


/* ============================================================
   6. ARTICLES AREA
   ============================================================ */
.articles-section {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* Column heading */
.articles-col__heading {
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.articles-col__heading i {
  color: var(--clr-primary);
  font-size: 1rem;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ---- Top Article card ---- */
.article-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.article-card:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--clr-primary-light);
}

.article-card__text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-primary);
  line-height: 1.45;
}

.article-card__arrow {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

.article-card:hover .article-card__arrow {
  color: var(--clr-primary);
}

/* ---- Recently Updated card ---- */
.update-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.update-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--clr-text-primary);
  text-align: center;
}

.update-card__meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ============================================================
   7. SUPPORT CTA (Section 4)
   ============================================================ */
.cta-section {
  background: var(--clr-cta-bg);
  border-top: 1px solid var(--clr-border);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
}

.cta-inner {
  max-width: 560px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.cta-section__title {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 600;
  color: var(--clr-text-primary);
  letter-spacing: -0.02em;
}

.cta-section__body {
  font-size: 0.9rem;
  color: var(--clr-text-secondary);
  max-width: 420px;
  line-height: 1.7;
}

.cta-section__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn--primary {
  background: var(--clr-primary);
  color: #fff;
  border-color: var(--clr-primary);
}

.btn--primary:hover {
  background: #6D28D9;
  border-color: #6D28D9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, .35);
}

.btn--secondary {
  background: #fff;
  color: var(--clr-text-primary);
  border-color: var(--clr-border);
}

.btn--secondary:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
  transform: translateY(-2px);
}


/* ============================================================
   8. HELP CENTER (Section 5) — IDs preserved as-is
   ============================================================ */
.support-ref {
  background: #18181b;
  color: #f4f4f5;
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

/* Logo icon inside Help Center */
.support-ref .support-icon {
  width: 56px;
  height: 56px;
}

.support-ref .support-icon svg {
  width: 56px;
  height: 56px;
}

/* h1 — Language Support */
.support-ref #support-h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}

/* Subtitle */
.support-ref .support-sub {
  font-size: 0.95rem;
  color: #a1a1aa;
}

.support-ref #support-start-here {
  color: var(--clr-primary-light);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px dashed var(--clr-primary-light);
  transition: color var(--transition-fast);
}

.support-ref #support-start-here:hover {
  color: #fff;
}

/* FAQ block */
.faq-ref {
  width: 100%;
  max-width: 820px;
  margin-top: var(--space-xl);
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  text-align: left;
}

.faq-head {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid #3f3f46;
}

.faq-ref #faq-h2 {
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 700;
  color: #d4d4d8;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl) var(--space-2xl);
}

.faq-grid h4 {
  font-family: var(--ff-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: #e4e4e7;
  margin-bottom: var(--space-xs);
  line-height: 1.4;
}

.faq-grid p {
  font-size: 0.825rem;
  color: #a1a1aa;
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

.faq-grid p:last-child {
  margin-bottom: 0;
}

/* Support CTA inside Help Center */
.support-ref .support-cta {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.support-ref .support-cta-text {
  font-size: 0.95rem;
  color: #a1a1aa;
}

.support-ref .support-cta-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

/* Help-Center buttons */
.support-ref .cta-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--ff-body);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--clr-primary);
  color: #fff;
  border: 2px solid var(--clr-primary);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.support-ref .cta-primary:hover {
  background: #6D28D9;
  border-color: #6D28D9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, .4);
}

.support-ref .cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--ff-body);
  font-size: 0.875rem;
  font-weight: 600;
  background: transparent;
  color: #d4d4d8;
  border: 2px solid #52525b;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.support-ref .cta-secondary:hover {
  border-color: var(--clr-primary-light);
  color: var(--clr-primary-light);
  transform: translateY(-2px);
}

/* Reveal animation */
.reveal {
  animation: fadeInUp 0.55s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================================
   9. FOOTER
   ============================================================ */
.site-footer {
  background: #09090b;
  border-top: 1px solid #27272a;
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
}

.site-footer p {
  font-size: 0.8rem;
  color: #71717a;
}


/* ============================================================
   10. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Large tablet / small desktop */
@media (max-width: 960px) {
  .doc-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet */
@media (max-width: 768px) {
  .container {
    padding-inline: var(--space-lg);
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-ref {
    padding: var(--space-lg);
  }
}

/* Mobile */
@media (max-width: 540px) {
  .doc-cards-grid {
    grid-template-columns: 1fr;
  }

  .cta-section__actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .support-ref .support-cta-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .support-ref .cta-primary,
  .support-ref .cta-secondary {
    width: 100%;
    justify-content: center;
  }

  .logo-wrap {
    padding: var(--space-sm) var(--space-md);
  }
}


/* ============================================================
   html.dark OVERRIDES
   ============================================================ */
html.dark {
  --clr-bg: #0f172a;
  --clr-surface: #1e293b;
  --clr-border: #334155;
  --clr-text-primary: #f1f5f9;
  --clr-text-secondary: #94a3b8;
  --clr-text-muted: #64748b;
  --clr-cta-bg: #111827;
}

html.dark body {
  background-color: var(--clr-bg);
  color: var(--clr-text-primary);
}

html.dark .site-header {
  background: #0b1220;
  border-bottom-color: #334155;
}

html.dark .logo-wrap {
  background: #1e293b;
  border-color: #334155;
}

html.dark .page-title {
  color: #f1f5f9;
}

html.dark .doc-card {
  background: #1e293b;
  border-color: #334155;
}

html.dark .doc-card:hover {
  border-color: #a78bfa;
}

html.dark .doc-card__title {
  color: #f1f5f9;
}

html.dark .doc-card__list li {
  color: #94a3b8;
}

html.dark .cta-section {
  background: #111827;
  border-top-color: #334155;
}

html.dark .cta-section__title {
  color: #f1f5f9;
}

html.dark .cta-section__body {
  color: #94a3b8;
}

html.dark .btn--secondary {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

html.dark .btn--secondary:hover {
  border-color: #a78bfa;
  color: #a78bfa;
}

html.dark .article-card,
html.dark .update-card {
  background: #1e293b;
  border-color: #334155;
}

html.dark .article-card__text,
html.dark .update-card__title {
  color: #f1f5f9;
}

html.dark .article-card__arrow,
html.dark .update-card__meta {
  color: #64748b;
}

html.dark .articles-col__heading {
  color: #f1f5f9;
}

html.dark .top-navbar {
  background: #0b1220;
  border-bottom-color: #334155;
}

html.dark #themeToggle {
  background: rgba(255,255,255,0.08);
  color: white;
}

@media (max-width: 768px) {
  .top-navbar {
    padding: 0 14px;
    height: 64px;
  }

  .nav-logo {
    font-size: 0.95rem;
  }
}