/* =========================================================
   PythonWD — Shared Stylesheet
   Python Windows Development SDK & Package Distribution
   ========================================================= */

:root {
  --color-blue: #306998;
  --color-blue-light: #4b8bc4;
  --color-yellow: #FFD43B;
  --color-bg-dark: #1a1a2e;
  --color-bg-darker: #131324;
  --color-bg-card: #22223f;
  --color-bg-light: #f7f9fc;
  --color-text: #e6e8f0;
  --color-text-muted: #a3a8c2;
  --color-text-dark: #1a1a2e;
  --color-border: #33345a;
  --radius: 8px;
  --max-width: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg-light);
  color: #232338;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--color-blue);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 16px;
}

p { margin: 0 0 16px; }

section { padding: 72px 0; }

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-heading h2 { font-size: 2rem; }
.section-heading p { color: #565a76; font-size: 1.05rem; }

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-blue);
  background: rgba(48, 105, 152, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--color-yellow);
  color: var(--color-text-dark);
  box-shadow: 0 4px 14px rgba(255, 212, 59, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(255, 212, 59, 0.5); }

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--color-blue);
  color: var(--color-blue);
}
.btn-outline-dark:hover { background: rgba(48, 105, 152, 0.08); }

.btn-block { width: 100%; }

/* ---------- Top Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
}
.navbar .logo:hover { text-decoration: none; }
.navbar .logo .logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-blue) 50%, var(--color-yellow) 50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
}
.navbar .logo .version-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-bg-dark);
  background: var(--color-yellow);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  text-decoration: none;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.open { max-height: 480px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 24px; width: 100%; }
  .nav-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 20% 20%, #24244a 0%, var(--color-bg-dark) 55%);
  color: #fff;
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 212, 59, 0.18), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: 2.85rem;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--color-yellow); }
.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 540px;
}
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.hero-stats div strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-yellow);
}
.hero-stats div span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
}

/* ---------- Code blocks ---------- */
.code-window {
  background: #14142a;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  overflow: hidden;
}
.code-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-window-dots { display: flex; gap: 6px; }
.code-window-dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #4a4a68;
}
.code-window-dots span:nth-child(1) { background: #ff5f56; }
.code-window-dots span:nth-child(2) { background: #ffbd2e; }
.code-window-dots span:nth-child(3) { background: #27c93f; }
.code-window-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.copy-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--color-text-muted);
  border-radius: 6px;
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
}
.copy-btn:hover { color: #fff; }

pre.code-block {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
}
code { font-family: var(--font-mono); }

/* python token colors (custom lightweight highlighter) */
.tok-kw { color: #ff7ab6; }        /* keywords */
.tok-str { color: #ffd43b; }       /* strings */
.tok-com { color: #6b7089; font-style: italic; } /* comments */
.tok-num { color: #b5cea8; }       /* numbers */
.tok-fn { color: #82aaff; }        /* function/method calls */
.tok-builtin { color: #4ec9b0; }   /* builtins/self */
.tok-op { color: #e6e8f0; }

/* inline code within prose */
p code, li code, td code {
  background: #eef1f8;
  color: #a0396c;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* ---------- Feature cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature-card {
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  box-shadow: 0 12px 30px rgba(26,26,46,0.08);
  transform: translateY(-3px);
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(48,105,152,0.1);
  color: var(--color-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { color: #565a76; font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Dark section (alternating) ---------- */
.section-dark {
  background: var(--color-bg-dark);
  color: #fff;
}
.section-dark .section-heading p { color: var(--color-text-muted); }

/* ---------- Stats / testimonials ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  margin-bottom: 64px;
}
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-item strong {
  display: block;
  font-size: 2.2rem;
  color: var(--color-yellow);
}
.stat-item span { color: var(--color-text-muted); font-size: 0.9rem; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}
.testimonial-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}
.testimonial-card p.quote {
  color: #d6d9ea;
  font-size: 0.95rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue), var(--color-blue-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.9rem;
}
.testimonial-author strong { display: block; font-size: 0.9rem; }
.testimonial-author span { font-size: 0.8rem; color: var(--color-text-muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--color-blue), #24507a);
  color: #fff;
  border-radius: 16px;
  padding: 56px;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.85); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-darker);
  color: var(--color-text-muted);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; max-width: 280px; }
.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-social { display: flex; gap: 16px; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: var(--color-bg-dark);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.page-header p { color: var(--color-text-muted); max-width: 620px; margin: 0 auto; }

/* ---------- Docs layout ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
  padding: 56px 0 96px;
}
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
}

.docs-sidebar {
  position: sticky;
  top: 88px;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: var(--radius);
  padding: 20px;
}
.docs-sidebar h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a8fa8;
  margin: 20px 0 8px;
}
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; margin: 0 0 4px; padding: 0; }
.docs-sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: #444a63;
  font-size: 0.9rem;
}
.docs-sidebar a:hover { background: #f2f4fa; text-decoration: none; }
.docs-sidebar a.active {
  background: rgba(48,105,152,0.1);
  color: var(--color-blue);
  font-weight: 600;
}

.docs-content h2 {
  font-size: 1.6rem;
  margin-top: 48px;
  padding-top: 8px;
  border-top: 1px solid #e6e9f2;
}
.docs-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.docs-content h3 { font-size: 1.15rem; margin-top: 28px; }
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9rem;
}
.docs-content th, .docs-content td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e6e9f2;
}
.docs-content th { color: #565a76; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.docs-content ul, .docs-content ol { padding-left: 22px; }
.docs-content li { margin-bottom: 6px; }

.callout {
  border-left: 4px solid var(--color-blue);
  background: rgba(48,105,152,0.06);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 0.92rem;
}
.callout.warning {
  border-left-color: var(--color-yellow);
  background: rgba(255,212,59,0.1);
}

/* ---------- Package reference table ---------- */
.pkg-jumplinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 32px;
  padding: 16px;
  background: #f7f9fc;
  border: 1px solid #e6e9f2;
  border-radius: var(--radius);
}
.pkg-jumplinks a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-blue);
  background: #fff;
  border: 1px solid #e6e9f2;
  padding: 6px 12px;
  border-radius: 999px;
}
.pkg-jumplinks a:hover {
  background: rgba(48,105,152,0.1);
  text-decoration: none;
}
.docs-content h3[id^="pkg-"] {
  scroll-margin-top: 96px;
}
.docs-content h2 {
  scroll-margin-top: 96px;
}

/* ---------- API reference ---------- */
.endpoint {
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.endpoint-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f7f9fc;
  border-bottom: 1px solid #e6e9f2;
  flex-wrap: wrap;
}
.method {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
}
.method-get { background: #2f9e44; }
.method-post { background: var(--color-blue); }
.method-put { background: #e8a90a; color: #1a1a2e; }
.endpoint-path {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
}
.endpoint-desc { color: #565a76; font-size: 0.9rem; margin-left: auto; }
.endpoint-body { padding: 20px; }
.endpoint-body h5 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a8fa8;
  margin: 16px 0 8px;
}
.endpoint-body h5:first-child { margin-top: 0; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
.price-card {
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border: 2px solid var(--color-blue);
  box-shadow: 0 16px 40px rgba(48,105,152,0.15);
  position: relative;
}
.price-card.featured::before {
  content: "Most Popular";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-yellow);
  color: var(--color-text-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
}
.price-card h3 { font-size: 1.1rem; color: #565a76; text-transform: uppercase; letter-spacing: 0.04em; }
.price-amount { font-size: 2.6rem; font-weight: 800; margin: 8px 0; }
.price-amount span { font-size: 1rem; font-weight: 500; color: #8a8fa8; }
.price-card ul { list-style: none; padding: 0; margin: 24px 0; flex-grow: 1; }
.price-card li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f2f8;
  font-size: 0.92rem;
  padding-left: 26px;
  position: relative;
}
.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2f9e44;
  font-weight: 700;
}

/* ---------- Contributors / about ---------- */
.contributors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 760px) {
  .contributors-grid { grid-template-columns: repeat(2, 1fr); }
}
.contributor-card {
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.contributor-card .avatar {
  width: 56px; height: 56px;
  font-size: 1.1rem;
  margin: 0 auto 12px;
}
.contributor-card strong { display: block; font-size: 0.95rem; }
.contributor-card span { font-size: 0.8rem; color: #8a8fa8; }

.license-box {
  background: var(--color-bg-card);
  color: #d6d9ea;
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}
