/**
 * PropVeritas Brand CSS — Website Edition
 * Global stylesheet for propveritas.com HTML pages.
 *
 * Usage:
 *   From root pages (index.html, beta.html, faq.html):  href="static/css/brand.css"
 *   From /blog/ pages:                                   href="../static/css/brand.css"
 *
 * Tailwind CDN handles layout utilities; this file owns:
 *   — Manrope font loading
 *   — Brand design tokens (CSS variables)
 *   — Base typography reset
 *   — Shared component styles (nav, buttons, cards, wordmark)
 */

/* ── Fonts ─────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800;900&display=swap');

/* ── Brand Tokens ──────────────────────────────────────────────────────────── */

:root {
  /* Colour */
  --pv-green:        #34d399;   /* Emerald — primary accent */
  --pv-green-dark:   #059669;   /* Emerald 600 — hover / dark variant */
  --pv-green-deep:   #047857;   /* Emerald 700 */
  --pv-indigo:       #818cf8;   /* Secondary / satellite accent */
  --pv-amber:        #f59e0b;   /* Energy / optimisation */
  --pv-bg:           #07091a;   /* Page background */
  --pv-surface:      #0c1228;   /* Card / panel surface */
  --pv-border:       rgba(255,255,255,0.07);
  --pv-border-green: rgba(52,211,153,0.22);

  /* Text — contrast-checked against #07091a */
  --pv-text:         #f8fafc;   /* Headings, primary content  ~16:1 */
  --pv-text-sub:     #e2e8f0;   /* Secondary content          ~13:1 */
  --pv-text-muted:   #94a3b8;   /* Body copy, descriptions    ~7:1  */
  --pv-text-dim:     #64748b;   /* Captions, secondary labels ~4.6:1 WCAG AA */
  --pv-text-xdim:    #475569;   /* Fine print, decorative     ~3:1  */

  /* Typography */
  --pv-font:      'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pv-tracking-tight:  -0.03em;
  --pv-tracking-wide:    0.12em;

  /* Backward-compatible aliases — legacy HTML pages use --brand-* names */
  --brand-primary:      #34d399;
  --brand-primary-dark: #059669;
  --brand-secondary:    #818cf8;
  --brand-accent:       #f59e0b;
  --brand-dark:         #080d1a;
  --brand-light:        #f8fafc;
  --brand-gray:         #94a3b8;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--pv-font);
}

/* Sections with an id get offset for fixed header */
section[id] {
  scroll-margin-top: 100px;
}

/* ── Navigation ────────────────────────────────────────────────────────────── */

.pv-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: rgba(7, 9, 26, 0.92);
  border-bottom: 1px solid var(--pv-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Wordmark ──────────────────────────────────────────────────────────────── */
/* Use as:
   <a href="/" class="pv-wordmark" style="font-size:20px;text-decoration:none;">
     <span class="prop">Prop</span><span class="veritas">Veritas</span>
   </a>
*/

.pv-wordmark {
  font-family: var(--pv-font);
  font-size: inherit;
  letter-spacing: -0.03em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}

.pv-wordmark .prop {
  font-weight: 300;
  color: var(--pv-green);
}

.pv-wordmark .veritas {
  font-weight: 700;
  color: var(--pv-text);
}

/* ── Section labels (eyebrows) ─────────────────────────────────────────────── */

.pv-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--pv-tracking-wide);
  color: var(--pv-text-dim);
  margin-bottom: 0.75rem;
}

.pv-label-green {
  color: var(--pv-green);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--pv-green-dark) 0%, var(--pv-green-deep) 100%);
  color: #ffffff;
  font-family: var(--pv-font);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.28);
}

.btn-primary:hover {
  opacity: 0.92;
  box-shadow: 0 6px 28px rgba(16, 185, 129, 0.38);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--pv-green);
  font-family: var(--pv-font);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(52, 211, 153, 0.35);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background: rgba(52, 211, 153, 0.08);
  border-color: var(--pv-green);
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */

.pv-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--pv-border);
  border-radius: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pv-card:hover {
  border-color: rgba(52, 211, 153, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Metric / stat cards */
.metric-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  border-color: rgba(52, 211, 153, 0.3);
}

/* Article / blog cards */
.article-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  border-color: rgba(52, 211, 153, 0.25);
}

/* ── Gradients ─────────────────────────────────────────────────────────────── */

.hero-gradient {
  background: linear-gradient(160deg, #0a0f22 0%, #0f172a 45%, #131e2e 100%);
}

.section-gradient-primary {
  background: linear-gradient(135deg, var(--pv-green-dark) 0%, var(--pv-green-deep) 100%);
}

.section-gradient-secondary {
  background: linear-gradient(135deg, var(--pv-indigo) 0%, var(--pv-green-dark) 100%);
}

/* ── Dividers ──────────────────────────────────────────────────────────────── */

.pv-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
  margin: 0;
}

/* ── Blog article typography ───────────────────────────────────────────────── */

.pv-article {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--pv-text-muted);
  max-width: 68ch;
}

.pv-article h1,
.pv-article h2,
.pv-article h3 {
  margin-top: 2em;
  margin-bottom: 0.75em;
  color: var(--pv-text);
  font-weight: 700;
}

.pv-article p {
  margin-bottom: 1.25em;
}

.pv-article a {
  color: var(--pv-green);
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 211, 153, 0.3);
  transition: border-color 0.15s ease;
}

.pv-article a:hover {
  border-color: var(--pv-green);
}

.pv-article ul,
.pv-article ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

.pv-article li {
  margin-bottom: 0.4em;
}

.pv-article blockquote {
  border-left: 3px solid var(--pv-green);
  margin: 2em 0;
  padding: 1rem 1.5rem;
  background: rgba(52, 211, 153, 0.05);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--pv-text-sub);
}
