/* ============================================================
   paperdue.css  —  Shared Design System
   Version: 2.0 | March 2026
   ============================================================
   Load this on EVERY PaperDue page before any page-specific CSS.
   Covers: tokens, reset, typography, header, footer, buttons,
   breadcrumb, sidebar CTA, mobile sticky CTA, animations.

   Class namespaces:
     pd-   shared components (header, footer, buttons, breadcrumb)
     pe-   paper example page  →  paper-example.css
     wg-   writing guide / WP  →  writing-guide.css
     hp-   homepage             →  homepage.css
   ============================================================ */


/* ────────────────────────────────────────────────
   RESET
──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }


/* ────────────────────────────────────────────────
   DESIGN TOKENS  (all pages share these)
──────────────────────────────────────────────── */
:root {
  /* Brand */
  --pd-navy:          #1a2744;
  --pd-navy-dark:     #111c33;
  --pd-navy-mid:      #243358;
  --pd-orange:        #e8732a;
  --pd-orange-dk:     #c85e1f;
  --pd-orange-lt:     #fdf0e8;
  --pd-orange-glow:   rgba(232, 115, 42, .35);

  /* Neutrals */
  --pd-white:         #ffffff;
  --pd-bg:            #f4f5f7;
  --pd-bg2:           #eef0f5;
  --pd-ink:           #1a1f2e;
  --pd-ink2:          #3d4460;
  --pd-ink3:          #6b7299;
  --pd-ink4:          #a0a8c0;

  /* Accent — links, info states */
  --pd-blue:          #2a4fa8;
  --pd-blue-lt:       #eef2fc;

  /* Status */
  --pd-green:         #1e8a4a;
  --pd-green-lt:      #edfaf3;

  /* Borders */
  --pd-border:        #e4e6ef;
  --pd-border2:       #d0d4e8;

  /* Shadows */
  --pd-shadow-sm:     0 1px 3px rgba(26, 39, 68, .07);
  --pd-shadow:        0 4px 20px rgba(26, 39, 68, .10);
  --pd-shadow-lg:     0 12px 48px rgba(26, 39, 68, .14);

  /* Border radii */
  --pd-r:             6px;
  --pd-r-lg:          10px;
  --pd-r-xl:          16px;
}


/* ────────────────────────────────────────────────
   BASE
──────────────────────────────────────────────── */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--pd-bg);
  color: var(--pd-ink);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pd-orange); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }


/* ────────────────────────────────────────────────
   READING PROGRESS BAR
──────────────────────────────────────────────── */
#pd-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pd-navy) 0%, var(--pd-orange) 100%);
  z-index: 9999;
  width: 0%;
  transition: width .08s linear;
}


/* ────────────────────────────────────────────────
   BUTTONS  (shared across all pages)
──────────────────────────────────────────────── */

/* Base */
.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.pd-btn:hover { text-decoration: none; }

/* Primary — orange, used for main CTAs */
.pd-btn-primary {
  background: var(--pd-orange);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--pd-r);
  font-size: 15px;
  box-shadow: 0 3px 12px var(--pd-orange-glow);
}
.pd-btn-primary:hover {
  background: var(--pd-orange-dk);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--pd-orange-glow);
}
.pd-btn-primary-lg { padding: 16px 36px; font-size: 16px; }
.pd-btn-primary-sm { padding: 9px 18px; font-size: 13.5px; }

/* Ghost white — dark backgrounds */
.pd-btn-ghost-white {
  background: transparent;
  color: rgba(255,255,255,.75);
  border: 1.5px solid rgba(255,255,255,.22);
  padding: 10px 20px;
  border-radius: var(--pd-r);
  font-size: 14px;
}
.pd-btn-ghost-white:hover { color: #fff; border-color: rgba(255,255,255,.5); }

/* Ghost dark — used for nav login button */
.pd-btn-ghost-dark {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.2);
  padding: 7px 14px;
  border-radius: var(--pd-r);
  cursor: pointer;
  transition: all .14s;
  text-decoration: none;
  display: inline-block;
}
.pd-btn-ghost-dark:hover { color: #fff; border-color: rgba(255,255,255,.45); text-decoration: none; }

/* Outline blue — secondary action on white backgrounds */
.pd-btn-outline {
  background: transparent;
  color: var(--pd-blue);
  border: 1.5px solid #c5d3f5;
  padding: 11px 22px;
  border-radius: var(--pd-r);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .14s;
  text-decoration: none;
  display: inline-block;
}
.pd-btn-outline:hover { background: var(--pd-blue-lt); border-color: var(--pd-blue); text-decoration: none; }

/* Green — TextCheckr */
.pd-btn-green {
  background: var(--pd-green);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--pd-r);
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all .14s;
  border: none;
  text-decoration: none;
  display: inline-block;
}
.pd-btn-green:hover { background: #176d3a; transform: translateY(-1px); text-decoration: none; }

/* Gate primary — full-width, large */
.pd-btn-gate {
  display: block;
  width: 100%;
  max-width: 420px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  background: var(--pd-orange);
  border: none;
  padding: 15px 24px;
  border-radius: var(--pd-r);
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 4px 16px var(--pd-orange-glow);
  margin-bottom: 11px;
}
.pd-btn-gate:hover { background: var(--pd-orange-dk); transform: translateY(-1px); box-shadow: 0 6px 22px var(--pd-orange-glow); }

/* Gate secondary — login link */
.pd-btn-gate-login {
  display: block;
  width: 100%;
  max-width: 420px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pd-blue);
  background: transparent;
  border: 1.5px solid #c5d3f5;
  padding: 11px 24px;
  border-radius: var(--pd-r);
  cursor: pointer;
  transition: all .14s;
  margin-bottom: 22px;
}
.pd-btn-gate-login:hover { background: var(--pd-blue-lt); border-color: var(--pd-blue); }


/* ────────────────────────────────────────────────
   STICKY HEADER
──────────────────────────────────────────────── */
.pd-header {
  background: var(--pd-navy);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .25);
}

.pd-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pd-logo {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  flex-shrink: 0;
  margin-right: 8px;
  text-decoration: none;
}
.pd-logo span { color: var(--pd-orange); }
.pd-logo:hover { text-decoration: none; }

.pd-nav {
  display: flex;
  gap: 2px;
  list-style: none;
  margin-right: auto;
}
.pd-nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  padding: 7px 12px;
  border-radius: var(--pd-r);
  text-decoration: none;
  transition: all .13s;
}
.pd-nav a:hover { color: #fff; background: rgba(255,255,255,.09); text-decoration: none; }

.pd-header-actions { display: flex; align-items: center; gap: 8px; }

/* Header CTA button (orange, distinct from ghost) */
.pd-btn-header {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--pd-orange);
  border: none;
  padding: 8px 20px;
  border-radius: var(--pd-r);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--pd-orange-glow);
  transition: all .15s;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
.pd-btn-header:hover { background: var(--pd-orange-dk); transform: translateY(-1px); text-decoration: none; }


/* ────────────────────────────────────────────────
   BREADCRUMB
──────────────────────────────────────────────── */
.pd-breadcrumb {
  font-size: 12.5px;
  color: var(--pd-ink4);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}
.pd-breadcrumb a { color: var(--pd-ink3); text-decoration: none; transition: color .12s; }
.pd-breadcrumb a:hover { color: var(--pd-orange); text-decoration: none; }
.pd-breadcrumb .sep { color: var(--pd-border2); }


/* ────────────────────────────────────────────────
   SHARED CARD BASE
──────────────────────────────────────────────── */
.pd-card {
  background: var(--pd-white);
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-r-lg);
  box-shadow: var(--pd-shadow-sm);
}

.pd-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--pd-ink4);
  margin-bottom: 12px;
}


/* ────────────────────────────────────────────────
   SIDEBAR PRIMARY CTA
   Used on: paper-example, writing-guide pages
──────────────────────────────────────────────── */
.pd-sb-cta {
  background: var(--pd-navy);
  border-radius: var(--pd-r-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.pd-sb-cta::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(232,115,42,.16) 0%, transparent 70%);
  pointer-events: none;
}

.pd-sb-eyebrow {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.4);
  margin-bottom: 7px;
}
.pd-sb-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 8px;
}
.pd-sb-title em { color: var(--pd-orange); font-style: normal; }
.pd-sb-body {
  font-size: 12.5px;
  color: rgba(255,255,255,.5);
  line-height: 1.65;
  margin-bottom: 13px;
}
.pd-sb-list { list-style: none; margin-bottom: 14px; }
.pd-sb-list li {
  font-size: 12.5px;
  color: rgba(255,255,255,.7);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.pd-sb-list li::before { content: '✓'; color: #6ee7b7; font-weight: 700; flex-shrink: 0; }

.pd-btn-sb {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--pd-orange);
  border: none;
  padding: 11px;
  border-radius: var(--pd-r);
  cursor: pointer;
  transition: all .14s;
  box-shadow: 0 2px 8px var(--pd-orange-glow);
}
.pd-btn-sb:hover { background: var(--pd-orange-dk); transform: translateY(-1px); }

.pd-sb-footnote {
  font-size: 11px;
  color: rgba(255,255,255,.25);
  text-align: center;
  margin-top: 7px;
}


/* ────────────────────────────────────────────────
   MOBILE STICKY CTA
──────────────────────────────────────────────── */
.pd-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--pd-white);
  border-top: 1px solid var(--pd-border);
  padding: 12px 16px;
  z-index: 300;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .1);
  align-items: center;
  gap: 12px;
}
.pd-mobile-cta-text {
  flex: 1;
  font-size: 13px;
  color: var(--pd-ink2);
  line-height: 1.35;
}
.pd-mobile-cta-text strong {
  display: block;
  color: var(--pd-ink);
  font-weight: 700;
}
.pd-btn-mobile {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--pd-orange);
  border: none;
  padding: 11px 20px;
  border-radius: var(--pd-r);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px var(--pd-orange-glow);
}


/* ────────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────────── */
.pd-footer {
  background: var(--pd-navy-dark);
  padding: 52px 24px 24px;
}
.pd-footer-inner { max-width: 1200px; margin: 0 auto; }

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

.pd-footer-logo {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.4px;
  margin-bottom: 10px;
  display: block;
  text-decoration: none;
}
.pd-footer-logo span { color: var(--pd-orange); }
.pd-footer-logo:hover { text-decoration: none; }
.pd-footer-desc {
  font-size: 13px;
  color: rgba(255,255,255,.32);
  line-height: 1.7;
  max-width: 210px;
}

.pd-footer-col-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.pd-footer-col ul { list-style: none; }
.pd-footer-col li { padding: 3.5px 0; }
.pd-footer-col a {
  font-size: 13.5px;
  color: rgba(255,255,255,.33);
  text-decoration: none;
  transition: color .12s;
}
.pd-footer-col a:hover { color: rgba(255,255,255,.78); }

.pd-footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,.22);
  flex-wrap: wrap;
  gap: 8px;
}
.pd-footer-links { display: flex; gap: 18px; }
.pd-footer-links a { color: rgba(255,255,255,.28); text-decoration: none; transition: color .12s; }
.pd-footer-links a:hover { color: rgba(255,255,255,.65); }


/* ────────────────────────────────────────────────
   ANIMATIONS  (staggered page load)
──────────────────────────────────────────────── */
@keyframes pd-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pd-anim-1 { animation: pd-fade-up .4s ease both; }
.pd-anim-2 { animation: pd-fade-up .4s .06s ease both; }
.pd-anim-3 { animation: pd-fade-up .4s .12s ease both; }
.pd-anim-4 { animation: pd-fade-up .4s .18s ease both; }


/* ────────────────────────────────────────────────
   SHARED RESPONSIVE  (applies across all pages)
──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .pd-mobile-cta { display: flex; }
  body { padding-bottom: 70px; }
  .pd-footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .pd-nav { display: none; }
  .pd-footer-top { grid-template-columns: 1fr; }
}
