/* ════════════════════════════════════════════════════════
   global.css — User Cooperative
   Single source of truth for all shared site styles.
   Nav → css/nav.css  |  Footer → css/footer.css
   Per-page unique styles go in a local <style> block.
   ════════════════════════════════════════════════════════ */

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

/* ─── DESIGN TOKENS ─── */
:root {
  --nav-height:   52px;
  --blue:         #0071e3;
  --blue-dk:      #0077ed;
  --blue-hover:   #0077ed;
  --blue-dark:    #006edb;
  --text:         #1d1d1f;
  --text-2:       #6e6e73;
  --subtext:      #6e6e73;
  --rule:         #d2d2d7;
  --rule-lt:      #e8e8ed;
  --border:       rgb(134, 134, 139);
  --border-light: rgb(210, 210, 215);
  --white:        #ffffff;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ─── BASE ─── */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #fff; }

body {
  font-family: var(--font);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: #fff;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ─── PAGE LAYOUT ─── */
main {
  width: 100%;
  padding-top: var(--nav-height);
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 6.25%;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── BUTTONS ─── */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px;
  border-radius: 980px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -0.022em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover { background: var(--blue-dk); border-color: var(--blue-dk); }
.btn-secondary {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-secondary:hover { background: var(--blue); color: #fff; }

/* ─── INLINE LINKS ─── */
.inline-link {
  color: var(--blue);
  text-decoration: none;
}
.inline-link:hover { text-decoration: underline; }

/* ─── SECTION TITLE ─── */
/*
 * Large left-aligned heading used on marketing pages (Surge Browser, About Us)
 * and any section that needs an "Equity for clicks."-style title.
 * Add class="scroll-reveal" to animate on scroll — same system as prose reveals.
 */
.section-title {
  font-size: 63px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--text);
}

/* Optional: "Learn more ›" style link beside or below a section title */
.section-link {
  font-size: 17px;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

@media (max-width: 1024px) {
  .section-title { font-size: 40px; }
}
@media (max-width: 734px) {
  .section-title { font-size: 32px; }
}

/* ─── MODULE TITLE ───────────────────────────────
 * Large centered section heading for info pages.
 * Usage: <h2 class="module-title">...</h2>
 * ─────────────────────────────────────────────── */
.module-title {
  font-size: 56px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 60px;
  margin-bottom: 40px;
  text-align: center;
}

@media (max-width: 1024px) {
  .module-title { font-size: 48px; letter-spacing: -0.24px; line-height: 48px; }
}
@media (max-width: 734px) {
  .module-title { font-size: 40px; letter-spacing: -0.2px; line-height: 40px; }
}

/* ─── INFO PAGE HERO ─────────────────────────────
 * Shared by News, Dividends, Governance, blog posts, member letters,
 * Articles of Incorporation, Bylaws, Terms of Service, Privacy Policy,
 * Community Standards, Funding, and any other text-first page.
 * Blog pages add .page-hero-byline inside; info pages omit it.
 * Hero sits outside <main>, between nav and main.
 * ─────────────────────────────────────────────── */
.page-hero-section {
  width: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 233px;
  padding: var(--nav-height) 0 0;
  margin-bottom: 0;
  animation: fadeUp 0.7s ease both;
  animation-delay: 0.05s;
}

.page-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}

.page-headline {
  font-size: 80px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}

/* Blog-only: author line inside hero */
.page-hero-byline {
  font-family: var(--font);
  font-size: 16px;
  color: var(--text-2);
  margin-top: 24px;
  text-align: center;
}

@media (max-width: 1024px) {
  .page-headline     { font-size: 64px; }
  .page-hero-section { height: 233px; }
}
@media (max-width: 734px) {
  .page-headline     { font-size: 48px; letter-spacing: -0.01em; }
  .page-hero-section { height: 233px; }
}
@media (max-width: 480px) {
  .page-headline     { font-size: 38px; }
  .page-hero-section { height: 233px; }
}

/* ─── PROSE BODY ─── */
/*
 * Wrap page content in <div class="page-body"> inside a .container.
 * Fluid: 16px mobile → 19px at 1125px+.
 */
.page-body {
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.3px;
  color: #1d1d1f;
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: left;
}
.page-body em,
.page-body i,
.page-body p[style*="italic"] { font-weight: 500; }

@media (min-width: 1125px) {
  .page-body {
    font-size: 19px;
    line-height: 26px;
    letter-spacing: -0.3px;
  }
}

.page-body p + p  { margin-top: 18px; }
.page-body strong { color: var(--text); font-weight: 600; }

/* ─── HAIRLINE DIVIDERS ─── */
.page-body hr {
  border: none;
  border-top: 1px solid var(--rule-lt);
  margin: 32px 0;
}

/* ─── ORDERED LISTS ─── */
.page-body ol {
  padding-left: 1.4em;
  margin-top: 18px;
  margin-bottom: 28px;
}
.page-body ol li { margin-bottom: 18px; }

/* ─── SECTION HEADINGS (within prose) ─── */
/*
 * Apply to <p> tags inside .page-body:
 *   .section-heading-first       first heading on the page (slightly less top margin)
 *   .section-heading             standard mid-prose heading
 *   .section-heading-spaced      after a major section break
 *   .section-heading-after-video immediately after a video embed
 */
.page-body p.section-heading,
.page-body p.section-heading-first,
.page-body p.section-heading-after-video,
.page-body p.section-heading-spaced {
  font-size: inherit;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.page-body p.section-heading-first       { margin-top: 28px; }
.page-body p.section-heading             { margin-top: 36px; }
.page-body p.section-heading-spaced      { margin-top: 36px; }
.page-body p.section-heading-after-video { margin-top: 28px; }

/* ─── BLOCKQUOTE ─── */
.page-body blockquote {
  border-left: 3px solid var(--rule);
  padding-left: 20px;
  margin: 18px 0;
  color: var(--text-2);
  font-style: italic;
}

/* ─── STATS / DATA TABLE ─── */
.stats-wrapper { margin: 0 0 28px 0; }

.stats-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}
.stats-table thead tr            { border-bottom: 1px solid rgb(231, 231, 231); }
.stats-table tbody tr            { border-bottom: 1px solid rgb(231, 231, 231); transition: background 0.15s ease; }
.stats-table tbody tr:last-child { border-bottom: none; }

.stats-table th {
  text-align: left;
  font-size: 17px; font-weight: 600;
  font-family: var(--font); color: var(--text);
  letter-spacing: -0.051px; line-height: 25px;
  padding: 21px 0 15px;
  background-color: transparent;
}
.stats-table td {
  font-size: 17px; font-weight: 400;
  font-family: var(--font); color: rgb(17, 17, 17);
  line-height: 25px; padding: 16px 0;
  vertical-align: top;
}
.stats-table td:first-child { width: 60%; padding-right: 32px; font-weight: 600; }
.stats-table td:last-child  { font-weight: 400; color: var(--text-2); text-align: right; }

/* ─── VIDEO PLAYER ─── */
.video-wrapper {
  margin: 48px auto;
  width: 100%; max-width: 640px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
.video-wrapper video { width: 100%; height: auto; display: block; }

/* ─── BYLINE BLOCK (bottom of blog / letter pages) ─── */
.page-byline {
  border-top: 1px solid rgb(231, 231, 231);
  padding-top: 24px;
  margin-top: 32px;
  margin-bottom: 120px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.page-byline p { color: var(--text-2); font-size: 16px; line-height: 1.6; }

/* ─── DEFINED TERM ───────────────────────────────
 * Legal/doc pages: <span class="defined-term">
 * ─────────────────────────────────────────────── */
.defined-term {
  color: var(--text);
  font-weight: 700;
}

/* ─── SCROLL / LOAD REVEAL ANIMATIONS ─── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.load-reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.load-reveal.delay-1 { animation-delay: 0.1s; }
.load-reveal.delay-2 { animation-delay: 0.3s; }

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .scroll-reveal,
  .load-reveal {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}
