/* ============================================================
   PROOFFRAME — UNIFIED STYLESHEET
   Version: 1.0 · MVP Build
   Headspace Studios Inc. · Internal · Do Not Distribute
   ============================================================

   FONT STACK PRIORITY (per role):

   H1 / Page Titles    → Horizon → Bebas Neue → Impact
   Headlines / H2–H3   → Gordita → Plus Jakarta Sans → system-ui
   Body Copy           → Inter → system-ui
   UI / Nav / Buttons  → Telegraf → Space Grotesk → system-ui
   Hash / ID Values    → (monospace fallback) → IBM Plex Mono → monospace

   TO ACTIVATE COMMERCIAL FONTS:
   1. License: Horizon, Gordita, Telegraf
   2. Add .woff2 files to /public/assets/fonts/
   3. Uncomment the @font-face blocks below

   THEME USAGE:
   - Dark theme (default) → admin.html
   - Light theme          → add class="theme-light" to <body>
     Used by: index.html, proofframe-app.html,
              certificate.html, profile.html
   ============================================================ */


/* ── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@300;400;500&display=swap');

/* ── COMMERCIAL FONTS ─────────────────────────────────────── */
/* Uncomment when font files are licensed and added to        */
/* /public/assets/fonts/                                      */
@font-face {
  font-family: 'Horizon';
  src: url('/assets/fonts/horizon/Horizon.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gordita';
  src: url('/assets/fonts/gordita/Gordita-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gordita';
  src: url('/assets/fonts/gordita/Gordita-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gordita';
  src: url('/assets/fonts/gordita/Gordita-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gordita';
  src: url('/assets/fonts/gordita/Gordita-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gordita';
  src: url('/assets/fonts/gordita/Gordita-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ── FONT STACK VARIABLES ─────────────────────────────────── */
:root {
  --font-display:   'Horizon',  Impact, sans-serif;
  --font-headline:  'Gordita',  system-ui, -apple-system, sans-serif;
  --font-body:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui:        'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:      'Inter', system-ui, -apple-system, sans-serif;
}


/* ── COLOR TOKENS — DARK THEME (default) ─────────────────── */
:root {
  --bg:          #07080C;
  --surface:     #0E1018;
  --raised:      #141720;
  --border:      rgba(255,255,255,0.07);
  --border-hi:   rgba(255,255,255,0.14);
  --teal:        #00C9A7;
  --teal-full:   #00C9A7;
  --teal-dim:    rgba(0,201,167,0.12);  
  --amber:       #E8A243;
  --amber-dim:   rgba(232,162,67,0.10);
  --red:         #E85F5F;
  --red-dim:     rgba(232,95,95,0.10);
  --green:       #2EAF70;
  --ink:         #E8E6E0;
  --muted:       #7A7870;
}


/* ── COLOR TOKENS — LIGHT THEME ──────────────────────────── */
/* Add class="theme-light" to <body> on light-bg pages        */
.theme-light {
  --bg:          #F0EDE6;
  --surface:     #FFFFFF;
  --raised:      #F8F6F1;
  --border:      rgba(0,0,0,0.08);
  --border-hi:   rgba(0,0,0,0.16);
  --teal:        #007A65;
  --teal-full:   #00C9A7;
  --teal-dim:    rgba(0,201,167,0.10);
  --amber:       #E8A243;
  --amber-dim:   rgba(232,162,67,0.10);
  --red:         #D94040;
  --red-dim:     rgba(217,64,64,0.08);
  --green:       #2EAF70;
  --ink:         #0D0D0D;
  --mid:         #5A5A5A;
  --muted:       #7A7870;
}


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

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


/* ── BASE ─────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}


/* ── TYPOGRAPHY — ELEMENT DEFAULTS ───────────────────────── */

/* H1 — Page titles, hero headlines */
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 55px;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.0;
}
h1 em { font-style: italic; color: var(--teal); }
/* H2 — Section headlines */
h2 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

/* H3 — Sub-headlines, card titles */
h3 {
  font-family: var(--font-headline);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.25px;
}

/* Body copy */
p {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
}

/* Form elements */
input, select, textarea {
  font-family: var(--font-ui);
  font-weight: 400;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 13px;
  width: 100%;
  transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal);
}

::placeholder {
  color: var(--muted);
}

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}


/* ── TYPOGRAPHY UTILITY CLASSES ──────────────────────────── */

/* Apply to any element to override font role */
.font-display   { font-family: var(--font-display);  text-transform: uppercase; letter-spacing: 2px; }
.font-headline  { font-family: var(--font-headline); font-weight: 700; }
.font-body      { font-family: var(--font-body); }
.font-ui        { font-family: var(--font-ui); }
.font-mono      { font-family: var(--font-mono); }

/* Eyebrow / section label */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
}

/* Data fields — certificate IDs, hashes, blockchain tx */
.data-field {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
  word-break: break-all;
}

/* Muted supporting text */
.text-muted { color: var(--muted); }

/* Teal accent text */
.text-teal  { color: var(--teal); }

/* Amber accent text */
.text-amber { color: var(--amber); }


/* ── NAVIGATION ───────────────────────────────────────────── */
.nav-link {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--ink);
  opacity: 1;
}

/* Wordmark — PROOFFRAME */
.wordmark {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}


/* ── BUTTON SYSTEM ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

/* Primary — teal fill */
.btn-primary {
  background: var(--teal);
  color: #07080C;
  border-color: var(--teal);
}
.btn-primary:hover {
  opacity: 0.85;
  color: #07080C;
}

/* Outline — transparent */
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-hi);
}
.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
  opacity: 1;
}

/* Dark fill */
.btn-dark {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-dark:hover {
  opacity: 0.85;
  color: var(--bg);
}

/* Amber — milestone / certificate actions */
.btn-amber {
  background: var(--amber);
  color: #07080C;
  border-color: var(--amber);
}
.btn-amber:hover {
  opacity: 0.85;
}

/* Disabled state */
.btn[disabled],
.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}


/* ── BADGE / TAG SYSTEM ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-teal  { background: var(--teal-dim);  border: 1px solid rgba(0,201,167,0.25);  color: var(--teal); }
.badge-amber { background: var(--amber-dim); border: 1px solid rgba(232,162,67,0.25); color: var(--amber); }
.badge-red   { background: var(--red-dim);   border: 1px solid rgba(232,95,95,0.25);  color: var(--red); }


/* ── STATUS DOT ───────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-teal  { background: var(--teal); }
.dot-amber { background: var(--amber); }
.dot-red   { background: var(--red); }
.dot-muted { background: var(--muted); }


/* ── CARD / SURFACE ───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--border-hi);
}

.card-raised {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}


/* ── SPINNER ──────────────────────────────────────────────── */
.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: pf-spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes pf-spin {
  to { transform: rotate(360deg); }
}


/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes pf-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pf-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.animate-fade-up { animation: pf-fade-up 0.5s ease both; }
.pulse           { animation: pf-pulse 2s infinite; }


/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  h1 { letter-spacing: 1px; }
  h2 { font-size: clamp(22px, 5vw, 36px); }
  .btn { font-size: 10px; padding: 10px 18px; }
}
