/*
 * Styles for the static /whitepapers page.
 * Standalone HTML (no SolidJS bundle), so this file carries the global
 * resets, color tokens, and font setup — same pattern as /insights/styles.css.
 */

:root {
  --navy: #1e1b4b;
  --navy-light: #2e2b5b;
  --purple: #a78bfa;
  --purple-light: #c4b5fd;
  --green: #4ade80;
  --green-dark: #22c55e;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(16px, 1.2vw, 20px);
}

body {
  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: var(--gray-800);
  line-height: 1.6;
  background: var(--white);
  font-size: clamp(1rem, 1.2vw, 1.25rem);
}

a {
  color: var(--purple);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: var(--purple);
}

/* --- Header (matches Nav.css and /insights/styles.css) --- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  border: none;
}

.logo img {
  height: 28px;
  width: auto;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 1rem;
}

.site-header nav a {
  color: var(--gray-600);
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: clamp(0.875rem, 1.2vw, 1.05rem);
  font-weight: 500;
  border: none;
  transition: color 0.2s;
}

.site-header nav a:hover {
  color: var(--navy);
  border-bottom: none;
}

.site-header nav a[aria-current="page"] {
  color: var(--navy);
  font-weight: 600;
}

/* --- Page wrapper --- */

main.wp-main {
  padding: 7rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Hero (typography matches .insights-hero) --- */

.wp-hero {
  margin-bottom: 4rem;
  max-width: 800px;
}

.wp-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.wp-hero p {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  color: var(--gray-600);
  line-height: 1.6;
}

/* --- Whitepaper entry --- */

.wp-paper {
  max-width: 860px;
  padding-top: 3rem;
  border-top: 1px solid var(--gray-200);
}

.wp-paper-category {
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple);
  margin-bottom: 1rem;
}

.wp-paper-title {
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.wp-paper-subtitle {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-style: italic;
  color: var(--gray-600);
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.wp-paper-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--gray-600);
  margin-bottom: 2.5rem;
}

.wp-paper-meta .dot {
  color: var(--gray-400);
}

/* Abstract */

.wp-paper-abstract {
  margin-bottom: 2.5rem;
}

.wp-paper-abstract-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

.wp-paper-abstract p {
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.75;
  color: var(--gray-800);
}

/* Download button */

.wp-paper-actions {
  margin-bottom: 2.5rem;
}

.wp-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--navy);
  color: var(--white);
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  border: none;
  transition:
    background 0.2s,
    transform 0.2s;
}

.wp-download-btn:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
  border: none;
}

.wp-download-icon {
  font-size: 1.1em;
  line-height: 1;
}

/* Inline PDF viewer */

.wp-paper-embed {
  margin: 0;
}

.wp-paper-embed iframe {
  width: 100%;
  height: clamp(600px, 85vh, 1100px);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  background: var(--gray-100);
  display: block;
}

.wp-paper-embed figcaption {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--gray-400);
  text-align: center;
}

.wp-paper-embed figcaption a {
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}

.wp-paper-embed figcaption a:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

/* --- Footer (matches /insights footer) --- */

footer.site-footer {
  background: var(--navy);
  border-top: 1px solid var(--navy-light);
  padding: 3rem 2rem;
  margin-top: 6rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-left p {
  color: var(--gray-400);
  font-size: clamp(0.8125rem, 1.2vw, 1rem);
}

.tagline-footer {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  color: var(--green);
  font-size: clamp(0.875rem, 1.3vw, 1.1rem);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--gray-400);
  font-size: clamp(0.8125rem, 1.2vw, 1rem);
  border: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
  border-bottom: none;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  /* Logo wordmark is ~300px wide — too wide to sit beside the nav on a
     phone, so let the header wrap the nav onto a second row. */
  .header-inner {
    flex-wrap: wrap;
    gap: 0.6rem 1.25rem;
    padding: 0.875rem 1.5rem;
  }

  .logo {
    min-width: 0;
  }

  .logo img {
    width: 300px;
    max-width: 100%;
    height: auto;
  }

  .site-header nav {
    gap: 1.25rem;
    margin-left: 0;
  }

  main.wp-main {
    padding: 7rem 1.5rem 3rem;
  }

  .wp-paper {
    padding-top: 2rem;
  }

  .wp-paper-embed iframe {
    height: 75vh;
    border-radius: 12px;
  }

  footer.site-footer {
    padding: 2rem 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
}
