/* ==========================================================================
   1. DESIGN TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
  --bg-dark: #070d19;
  --bg-card: #0d172a;
  --border: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(255, 255, 255, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-gold: #e2b867;
  --accent-teal: #38bdf8;
  --accent-emerald: #10b981;
  --accent-rust: #f43f5e;
  --glass: rgba(13, 23, 42, 0.6);
}

/* ==========================================================================
   2. BASE RESET & GLOBAL STYLES
   ========================================================================== */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body { 
  background: var(--bg-dark); 
  color: var(--text-primary); 
  font-family: 'Manrope', sans-serif; 
  -webkit-font-smoothing: antialiased; 
  line-height: 1.6;
  overflow-x: hidden;
}

.mono { 
  font-family: 'JetBrains Mono', monospace; 
  font-size: 11px; 
  letter-spacing: 0.05em; 
}

.wrap { 
  max-width: 1140px; 
  margin: 0 auto; 
  padding: 0 24px; 
}

section.pad { 
  padding: 80px 0; 
}

/* ==========================================================================
   3. NAVIGATION HEADER
   ========================================================================== */
header { 
  background: var(--glass); 
  backdrop-filter: blur(12px); 
  border-bottom: 1px solid var(--border); 
  position: sticky; 
  top: 0; 
  z-index: 100;
}

header .wrap { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 18px 24px; 
  gap: 20px; 
}

.brand { 
  font-family: 'JetBrains Mono', monospace; 
  font-size: 14px; 
  font-weight: 500;
  color: var(--text-primary); 
  text-decoration: none; 
  letter-spacing: 1px;
  display: flex; 
  align-items: center; 
  gap: 8px;
}

.brand span { 
  color: var(--accent-gold); 
}

.rd-nav { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  background: rgba(255, 255, 255, 0.03); 
  padding: 4px; 
  border-radius: 99px; 
  border: 1px solid var(--border); 
}

.rd-link { 
  font-size: 13px; 
  font-weight: 500; 
  color: var(--text-secondary); 
  text-decoration: none; 
  padding: 6px 16px; 
  border-radius: 99px; 
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.rd-link:hover { 
  color: var(--text-primary); 
  background: rgba(255, 255, 255, 0.03); 
}

.rd-link.active { 
  color: var(--bg-dark); 
  background: var(--text-primary); 
  font-weight: 600; 
}

.rd-link.locked { 
  opacity: 0.25; 
  cursor: not-allowed; 
}

.roletag { 
  background: rgba(226, 184, 103, 0.1); 
  border: 1px solid rgba(226, 184, 103, 0.2); 
  color: var(--accent-gold); 
  padding: 4px 12px; 
  border-radius: 6px; 
  font-size: 11px; 
  font-weight: 600; 
}

/* ==========================================================================
   4. LAYOUT CONTROLS & ANIMATIONS
   ========================================================================== */
.screen { 
  display: none; 
  opacity: 0; 
  transform: translateY(16px); 
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
}

.screen.show { 
  display: block; 
  opacity: 1; 
  transform: translateY(0); 
}

/* ==========================================================================
   5. UI TYPOGRAPHY & INTERACTIVE CORE COMPONENTS
   ========================================================================== */
.eyebrow { 
  font-family: 'JetBrains Mono', monospace; 
  font-size: 12px; 
  color: var(--accent-gold); 
  text-transform: uppercase; 
  letter-spacing: 2px; 
  margin-bottom: 16px; 
}

h1 { 
  font-family: 'Fraunces', serif; 
  font-weight: 300; 
  letter-spacing: -0.03em; 
  color: var(--text-primary); 
}

.hero h1 { 
  font-size: clamp(38px, 6vw, 64px); 
  line-height: 1.1; 
  margin-bottom: 24px; 
}

.hero h1 em { 
  font-style: normal; 
  font-weight: 400; 
  color: transparent; 
  -webkit-text-fill-color: transparent; 
  background: linear-gradient(135deg, #fff 30%, var(--accent-gold)); 
  -webkit-background-clip: text; 
}

.btn { 
  display: inline-flex; 
  align-items: center; 
  gap: 10px; 
  background: var(--text-primary); 
  color: var(--bg-dark); 
  border: none; 
  padding: 16px 32px; 
  border-radius: 12px; 
  font-family: inherit; 
  font-size: 15px; 
  font-weight: 600; 
  cursor: pointer; 
  transition: all 0.2s ease; 
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.btn:hover { 
  background: var(--accent-gold); 
  transform: translateY(-2px); 
}

.btn:disabled { 
  background: rgba(255, 255, 255, 0.05); 
  color: rgba(255, 255, 255, 0.2); 
  cursor: not-allowed; 
  transform: none; 
  box-shadow: none; 
}

.chip-group { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin: 24px 0 40px; 
}

.chip { 
  background: rgba(255, 255, 255, 0.02); 
  color: var(--text-secondary); 
  border: 1px solid var(--border);
  padding: 12px 24px; 
  border-radius: 10px; 
  font-size: 14px; 
  font-weight: 500; 
  cursor: pointer; 
  transition: all 0.2s;
}

.chip:hover { 
  border-color: var(--border-glow); 
  color: var(--text-primary); 
}

.chip.active { 
  background: rgba(255, 255, 255, 0.06); 
  color: var(--text-primary); 
  border-color: rgba(255, 255, 255, 0.3); 
  font-weight: 600; 
}

/* ==========================================================================
   6. BENTO GRID GRID STRUCTURE & CARDS
   ========================================================================== */
.bento-grid { 
  display: grid; 
  grid-template-columns: 1.6fr 1fr; 
  gap: 24px; 
  margin-top: 32px; 
}

.card { 
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 20px; 
  padding: 32px; 
  transition: border 0.3s ease; 
}

.card:hover { 
  border-color: var(--border-glow); 
}

/* ==========================================================================
   7. INGESTION INTERFACES (DROPZONE & INPUTS)
   ========================================================================== */
.drop { 
  border: 2px dashed rgba(255, 255, 255, 0.1); 
  border-radius: 16px; 
  padding: 60px 24px; 
  text-align: center; 
  cursor: pointer; 
  transition: all 0.3s; 
  background: rgba(255, 255, 255, 0.01); 
}

.drop:hover, .drop.drag { 
  border-color: var(--accent-gold); 
  background: rgba(226, 184, 103, 0.02); 
}

.filechip { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  background: rgba(16, 185, 129, 0.05); 
  border: 1px solid rgba(16, 185, 129, 0.2); 
  border-radius: 12px; 
  padding: 18px; 
}

textarea, input[type=text] { 
  width: 100%; 
  padding: 16px; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
  background: rgba(0, 0, 0, 0.2); 
  font-family: inherit; 
  font-size: 15px; 
  color: #fff; 
  outline: none; 
  transition: border 0.2s;
}

textarea:focus, input[type=text]:focus { 
  border-color: rgba(255, 255, 255, 0.25); 
}

.consent { 
  display: flex; 
  align-items: flex-start; 
  gap: 14px; 
  padding: 16px 0; 
  border-bottom: 1px solid var(--border); 
  cursor: pointer; 
}

.consent:last-child { 
  border: none; 
}

input[type=checkbox] { 
  accent-color: var(--accent-gold); 
  width: 18px; 
  height: 18px; 
  margin-top: 2px; 
  flex: none; 
}

/* ==========================================================================
   8. LOADING & PROGRESS ANIMATION
   ========================================================================== */
.loader { 
  width: 50px; 
  height: 50px; 
  border: 2px solid rgba(255, 255, 255, 0.05); 
  border-top-color: var(--accent-gold); 
  border-radius: 50%; 
  animation: spin 0.8s linear infinite; 
  margin: 0 auto 24px; 
}

@keyframes spin { 
  to { transform: rotate(360deg); } 
}

/* ==========================================================================
   9. METRIC REPORT DASHBOARD DISPLAY
   ========================================================================== */
.dashboard { 
  display: grid; 
  grid-template-columns: 1fr 1.5fr; 
  gap: 32px; 
  align-items: start; 
  margin-top: 40px; 
}

.metrics-sidebar { 
  position: sticky; 
  top: 100px; 
  display: flex; 
  flex-direction: column; 
  gap: 24px; 
}

.score-card { 
  background: radial-gradient(100% 100% at 50% 0%, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%), var(--bg-card); 
  text-align: center; 
}

.scorering { 
  position: relative; 
  width: 200px; 
  height: 200px; 
  margin: 24px auto; 
}

.ringsvg { 
  transform: rotate(-90deg); 
  width: 200px; 
  height: 200px; 
}

.ring-bg { 
  fill: none; 
  stroke: rgba(255, 255, 255, 0.03); 
  stroke-width: 12; 
}

.ring-fill { 
  fill: none; 
  stroke: var(--accent-gold); 
  stroke-width: 12; 
  stroke-linecap: round; 
  stroke-dasharray: 565.48; 
  stroke-dashoffset: 565.48; 
  transition: stroke-dashoffset 2s cubic-bezier(0.16, 1, 0.3, 1); 
}

.ringnum { 
  position: absolute; 
  inset: 0; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
}

.bignum { 
  font-family: 'Fraunces', serif; 
  font-size: 64px; 
  font-weight: 400; 
  line-height: 1; 
}

.barlabel { 
  display: flex; 
  justify-content: space-between; 
  font-size: 13px; 
  font-weight: 500; 
  color: var(--text-secondary); 
  margin-bottom: 8px; 
}

.track { 
  height: 6px; 
  background: rgba(255, 255, 255, 0.05); 
  border-radius: 99px; 
  overflow: hidden; 
  position: relative; 
  margin-bottom: 16px; 
}

.fill { 
  height: 100%; 
  background: var(--accent-gold); 
  width: 0; 
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1); 
  border-radius: 99px; 
}

.features-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 16px; 
  margin: 24px 0; 
}

.feature-item { 
  display: flex; 
  align-items: flex-start; 
  gap: 8px; 
  font-size: 13px; 
  color: var(--text-secondary); 
}

.feature-item svg { 
  width: 16px; 
  height: 16px; 
  fill: none; 
  stroke: var(--accent-teal); 
  stroke-width: 2; 
  flex: none; 
  margin-top: 2px;
}

.consent-text { 
  display: flex; 
  flex-direction: column; 
  gap: 2px; 
}

/* ==========================================================================
   10. REPORT SECTIONS, VECTORS & ACTION BLUEPRINTS
   ========================================================================== */
.report-section { 
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 20px; 
  padding: 32px; 
  margin-bottom: 24px; 
}

.gap-item { 
  padding: 16px; 
  background: rgba(244, 63, 94, 0.02); 
  border: 1px solid rgba(244, 63, 94, 0.1); 
  border-radius: 12px; 
  margin-bottom: 12px; 
}

.gap-title { 
  font-weight: 600; 
  color: var(--accent-rust); 
  margin-bottom: 4px; 
}

.plan-item { 
  padding: 12px 16px; 
  background: rgba(255, 255, 255, 0.02); 
  border: 1px solid var(--border); 
  border-radius: 10px; 
  margin-bottom: 8px; 
  font-size: 14px; 
}

/* ==========================================================================
   11. FOOTER BRANDING DISPLAY
   ========================================================================== */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 80px;
}

/* ==========================================================================
   12. MEDIA RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media(max-width: 960px) { 
  .dashboard { grid-template-columns: 1fr; } 
  .metrics-sidebar { position: static; }
}

@media(max-width: 890px){
  header .wrap { flex-direction: column; padding: 16px; gap: 12px; }
  .rd-nav { width: 100%; justify-content: space-between; overflow-x: auto; }
  .roletag { display: none; }
}

@media(max-width: 768px) { 
  .bento-grid { grid-template-columns: 1fr; } 
}

@media(max-width: 640px) { 
  .features-grid { grid-template-columns: 1fr; } 
}