/* =========================================================================
   WHITEPAPER STYLES — /why and /why/sources
   Reading-optimized, but rooted in Looper's design language:
   - Same fonts (Fraunces serif, Inter sans)
   - Same color tokens (paper, ink, green, amber)
   - Tightened layout for long-form reading: 720px max-width, 1.7 line-height
   ========================================================================= */

:root {
  /* Mirrors the main site's tokens */
  --paper: #fafaf7;
  --paper-2: #f0efe9;
  --ink-950: #0d1110;
  --ink-700: rgba(13, 17, 16, 0.7);
  --ink-500: rgba(13, 17, 16, 0.55);
  --ink-300: rgba(13, 17, 16, 0.35);

  --green-700: #15803d;
  --green-600: #16a34a;
  --green-100: rgba(22, 163, 74, 0.08);

  --amber-400: #fbbf24;
  --amber-600: #d97706;
  --amber-300: #fcd34d;

  --night: #0a0e0d;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-950);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------------------
   HEADER — slim, persistent, Looper logo as Home link
   ------------------------------------------------------------------------- */
.wp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(13, 17, 16, 0.06);
}

.wp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  text-decoration: none;
  color: var(--ink-950);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  transition: opacity 0.15s ease;
}
.wp-brand:hover { opacity: 0.7; }

.wp-brand-mark {
  display: inline-block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background-color: var(--green-600);
  -webkit-mask-image: url("/looper-logo.png");
  mask-image: url("/looper-logo.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color 0.15s ease;
}
.wp-brand:hover .wp-brand-mark {
  background-color: var(--green-700);
}

.wp-brand-name {
  color: var(--ink-950);
}

/* -------------------------------------------------------------------------
   MAIN + ARTICLE — centered, max-width 720px, generous vertical breathing
   ------------------------------------------------------------------------- */
.wp-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px 40px;
}

.wp-article-header {
  margin-bottom: 56px;
}

.wp-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink-950);
  margin: 0 0 24px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

.wp-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink-700);
  margin: 0;
  font-variation-settings: "opsz" 60, "SOFT" 80;
}

/* -------------------------------------------------------------------------
   BODY — reading-optimized typography
   ------------------------------------------------------------------------- */
.wp-body {
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink-950);
}

.wp-body > * {
  margin-block: 0 1.3em;
}

/* Section headers — clear hierarchy without shouting */
.wp-body h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink-950);
  margin: 2.5em 0 0.8em;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}

.wp-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink-950);
  margin: 2em 0 0.6em;
}

/* Strong — used for key terms (Transfer-Problem, Memory, etc.).
   Tinted with Looper green to reinforce the brand subtly. */
.wp-body strong {
  color: var(--green-700);
  font-weight: 600;
}

/* Emphasis — italic for atmospheric pulls / direct speech quotes */
.wp-body em {
  font-style: italic;
  color: var(--ink-700);
}

/* Paragraphs — comfortable reading default */
.wp-body p {
  margin: 0 0 1.3em;
}

/* Lists — left-aligned, comfortable spacing */
.wp-body ul,
.wp-body ol {
  margin: 0 0 1.3em;
  padding-left: 1.4em;
}
.wp-body li {
  margin: 0 0 0.5em;
}
.wp-body li::marker {
  color: var(--ink-500);
}

/* Blockquote — used for the Looper definition box; not applicable on /why
   but kept here for /why/sources or future variations */
.wp-body blockquote {
  margin: 1.8em 0;
  padding: 18px 24px;
  background: var(--green-100);
  border-left: 3px solid var(--green-600);
  border-radius: 0 8px 8px 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-950);
}
.wp-body blockquote p {
  margin: 0 0 0.4em;
}
.wp-body blockquote p:last-child {
  margin-bottom: 0;
}

/* Horizontal rule — subtle visual divider */
.wp-body hr {
  border: none;
  border-top: 1px solid var(--ink-300);
  margin: 3em auto;
  width: 80px;
}

/* Links — green underline that grows on hover */
.wp-body a {
  color: var(--green-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 0.15s ease;
}
.wp-body a:hover {
  text-decoration-thickness: 2px;
}

/* -------------------------------------------------------------------------
   CTA SECTION — Apply for beta, before the footer
   ------------------------------------------------------------------------- */
.wp-cta {
  max-width: 600px;
  margin: 80px auto 0;
  padding: 48px 32px;
  text-align: center;
  background: var(--paper-2);
  border-radius: 12px;
}

.wp-cta-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-700);
  margin: 0 0 20px;
}

.wp-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px 14px 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber-400), var(--amber-600));
  color: white;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wp-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(217, 119, 6, 0.5);
}
.wp-cta-arrow {
  transition: transform 0.18s ease;
}
.wp-cta-button:hover .wp-cta-arrow {
  transform: translateX(4px);
}

.wp-cta-fineprint {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-500);
  margin: 18px 0 0;
}

/* -------------------------------------------------------------------------
   FOOTER — minimal, mirrors the main site's footer pattern
   ------------------------------------------------------------------------- */
.wp-footer {
  background: var(--night);
  color: rgba(250, 250, 247, 0.7);
  padding: 40px 32px;
  margin-top: 80px;
}

.wp-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.wp-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  color: rgba(250, 250, 247, 0.9);
}

.wp-footer-meta {
  font-family: var(--sans);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wp-footer-meta a {
  color: rgba(250, 250, 247, 0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}
.wp-footer-meta a:hover {
  color: rgba(250, 250, 247, 1);
}

.wp-dot {
  color: rgba(250, 250, 247, 0.3);
}

/* -------------------------------------------------------------------------
   RESPONSIVE — mobile padding tweaks
   ------------------------------------------------------------------------- */
@media (max-width: 720px) {
  body { font-size: 17px; }

  .wp-brand { padding: 12px 20px; font-size: 15px; }

  .wp-main { padding: 50px 22px 30px; }

  .wp-article-header { margin-bottom: 40px; }

  .wp-subtitle { font-size: 18px; }

  .wp-body { font-size: 17px; line-height: 1.7; }

  .wp-body h2 { margin-top: 2em; }

  .wp-cta { padding: 36px 24px; margin-top: 60px; }

  .wp-footer { padding: 30px 22px; }
  .wp-footer-inner { flex-direction: column; align-items: flex-start; }
}
