/* ============================================================
   PostureCheck — Global Stylesheet
   Design: Dark navy base, cyan accent, clean & professional
   ============================================================ */

:root {
  --bg-base:       #080c18;
  --bg-surface:    #0f1629;
  --bg-elevated:   #162040;
  --bg-card:       #1a2540;
  --border:        #1e2d50;
  --border-light:  #2a3f6f;

  --accent:        #00d4ff;
  --accent-dim:    rgba(0, 212, 255, 0.12);
  --accent-glow:   rgba(0, 212, 255, 0.25);

  --purple:        #7c3aed;
  --purple-dim:    rgba(124, 58, 237, 0.15);

  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --orange:        #f97316;

  --text-primary:  #f0f4ff;
  --text-secondary:#8ba3c7;
  --text-muted:    #4a6080;

  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 40px rgba(0, 212, 255, 0.12);

  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; font-size: 16px; scrollbar-gutter: stable; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
button { cursor: pointer; font-family: var(--font); border: none; }

/* ─── Typography ─────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--text-secondary); }

.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger  { color: var(--danger); }

/* ─── Layout ─────────────────────────────────────────────────────── */
.container { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ─── Navbar ─────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 24, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.navbar-brand .brand-dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Language / Market toggle ───────────────────────────────────── */
.toggle-group {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.toggle-btn {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.toggle-btn.active {
  background: var(--accent);
  color: var(--bg-base);
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 span { color: var(--accent); }

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 20px auto 40px;
  line-height: 1.7;
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.25s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-base);
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-lg { padding: 18px 40px; font-size: 1.1rem; border-radius: var(--radius-lg); }

.btn-cta {
  background: linear-gradient(135deg, var(--accent), #0096ff);
  color: var(--bg-base);
  font-size: 1.1rem;
  padding: 18px 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,212,255,0.3);
  font-weight: 700;
}
.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 48px rgba(0,212,255,0.4);
}

/* ─── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-light); }
.card-glow { box-shadow: var(--shadow-card), var(--shadow-glow); }

/* ─── Features grid (landing) ────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.feature-icon {
  width: 48px; height: 48px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* ─── Progress Bar ───────────────────────────────────────────────── */
.progress-wrapper {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 32px;
}

#progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  border-radius: 999px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Audit Screen ───────────────────────────────────────────────── */
#screen-audit {
  max-width: 680px;
  margin: 60px auto;
  padding: 0 24px;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  margin-bottom: 24px;
  opacity: 0.85;
}

.question-number {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

#question-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--text-primary);
}

#question-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 32px;
}

/* ─── Option buttons ─────────────────────────────────────────────── */
#options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.option-btn {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s;
}

.option-btn:hover {
  border-color: var(--border-light);
  background: var(--bg-surface);
  transform: translateX(4px);
}

.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

/* ─── Audit nav ──────────────────────────────────────────────────── */
.audit-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.audit-nav button {
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.audit-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#btn-prev {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}
#btn-prev:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

#btn-next {
  background: var(--accent);
  color: var(--bg-base);
  box-shadow: 0 0 20px var(--accent-glow);
}
#btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 28px var(--accent-glow);
}

/* ─── Results page ───────────────────────────────────────────────── */
.results-hero {
  text-align: center;
  padding: 60px 24px 40px;
}

.score-ring-container {
  position: relative;
  width: 160px; height: 160px;
  margin: 0 auto 24px;
}

.score-ring-container svg {
  transform: rotate(-90deg);
}

#score-number {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.score-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

#tier-label {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

#tier-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ─── Domain breakdown ───────────────────────────────────────────── */
.domain-bar-item { margin-bottom: 20px; }

.domain-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.domain-bar-label { font-weight: 500; color: var(--text-primary); }
.domain-bar-pct   { font-weight: 700; }

.bar-track {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
}

/* ─── Finding cards ──────────────────────────────────────────────── */
.finding-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 14px;
}

.finding-card.finding-critical {
  border-left: 3px solid var(--danger);
}

.finding-domain {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.finding-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.finding-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ─── Paywall section ────────────────────────────────────────────── */
.paywall-section {
  background: linear-gradient(135deg, rgba(0,212,255,0.05), rgba(124,58,237,0.05));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  margin: 48px 0;
}

.paywall-blur {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
  margin-bottom: 24px;
}

.paywall-price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  margin: 16px 0 8px;
}

.paywall-includes {
  list-style: none;
  text-align: left;
  display: inline-block;
  margin: 24px 0 32px;
}

.paywall-includes li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 6px 0;
}

.paywall-includes li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

/* ─── Framework badges ───────────────────────────────────────────── */
.framework-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fw-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.fw-lgpd     { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.fw-essential8 { background: rgba(0,212,255,0.12); color: var(--accent); border: 1px solid rgba(0,212,255,0.25); }
.fw-privacy  { background: rgba(124,58,237,0.15); color: #a855f7; border: 1px solid rgba(124,58,237,0.3); }

/* ─── Market selector (landing) ──────────────────────────────────── */
.market-selector {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 36px;
}

.market-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

.market-btn:hover, .market-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.market-btn .flag { font-size: 1.4rem; }

/* ─── Section divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 60px 0;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

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

.fade-up { animation: fadeUp 0.5s ease forwards; }
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .market-selector { flex-direction: column; align-items: center; }
  .question-card { padding: 28px 20px; }
  .paywall-section { padding: 32px 20px; }
  .hero { padding: 70px 20px 50px; }
}
