/* ============================================================
   TOOLSHERPA — Global Styles
   Dark mode cave aesthetic
   ============================================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Backgrounds */
  --bg-primary: #0F1117;
  --bg-secondary: #161822;
  --bg-card: #1C1F2E;
  --bg-card-hover: #242738;
  --bg-input: #1C1F2E;

  /* Text */
  --text-primary: #F1F1F3;
  --text-secondary: #A0A3B1;
  --text-muted: #6B6E7B;

  /* Brand Colors */
  --cave-purple: #8B5CF6;
  --cave-purple-hover: #7C3AED;
  --summit-blue: #2563EB;
  --summit-blue-hover: #1D4ED8;
  --basecamp-green: #10B981;
  --compass-gold: #F59E0B;
  --danger-red: #EF4444;

  /* Borders */
  --border-subtle: #2A2D3E;
  --border-accent: #8B5CF640;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.15);

  /* Sizing */
  --max-width: 1120px;
  --radius: 12px;
  --radius-sm: 8px;

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

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: var(--cave-purple);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--cave-purple-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.text-gradient {
  background: linear-gradient(135deg, var(--cave-purple), var(--summit-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gold { color: var(--compass-gold); }
.text-green { color: var(--basecamp-green); }
.text-purple { color: var(--cave-purple); }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo .logo-icon {
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  background: var(--cave-purple);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.nav-cta:hover {
  background: var(--cave-purple-hover);
}

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links.open { display: flex; }
}

/* --- Hero --- */
.hero {
  padding: 8rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  margin-bottom: 1.5rem;
  position: relative;
}

.hero .subtitle {
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.hero .proof-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.proof-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.proof-item .num {
  color: var(--compass-gold);
  font-weight: 700;
  font-size: 1rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-accent);
}

.card-featured {
  border-color: var(--cave-purple);
  box-shadow: var(--shadow-glow-purple);
}

/* --- Summit Pick Section --- */
.summit-pick {
  background: var(--bg-secondary);
}

.summit-pick .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.12);
  color: var(--compass-gold);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

/* --- Trust Section --- */
.trust-section h2 {
  margin-bottom: 1rem;
}

.trust-content {
  max-width: 720px;
  margin: 0 auto;
}

.trust-content p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.9;
}

.trust-content strong {
  color: var(--text-primary);
}

/* --- Newsletter --- */
.newsletter {
  background: var(--bg-secondary);
  text-align: center;
}

.newsletter-box {
  max-width: 560px;
  margin: 0 auto;
}

.newsletter h2 {
  margin-bottom: 0.5rem;
}

.newsletter .tagline {
  color: var(--cave-purple);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.email-form {
  display: flex;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
}

.email-form input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.email-form input:focus {
  border-color: var(--cave-purple);
}

.email-form input::placeholder {
  color: var(--text-muted);
}

.small-print {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--cave-purple);
  color: white;
}
.btn-primary:hover {
  background: var(--cave-purple-hover);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--cave-purple);
  border: 1px solid var(--cave-purple);
}
.btn-outline:hover {
  background: rgba(139, 92, 246, 0.1);
  color: var(--cave-purple);
}

.btn-gold {
  background: var(--compass-gold);
  color: #0F1117;
}
.btn-gold:hover {
  background: #D97706;
  color: #0F1117;
}

/* --- Sherpa Score Badge --- */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.5rem;
}

.score-badge .score-num {
  font-size: 2rem;
  line-height: 1;
}

.score-badge.summit .score-num { color: var(--compass-gold); }
.score-badge.solid .score-num { color: var(--basecamp-green); }
.score-badge.mixed .score-num { color: var(--summit-blue); }
.score-badge.careful .score-num { color: var(--compass-gold); }
.score-badge.skip .score-num { color: var(--danger-red); }

.verdict-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.verdict-label.summit { background: rgba(245, 158, 11, 0.15); color: var(--compass-gold); }
.verdict-label.solid { background: rgba(16, 185, 129, 0.15); color: var(--basecamp-green); }
.verdict-label.mixed { background: rgba(37, 99, 235, 0.15); color: var(--summit-blue); }
.verdict-label.careful { background: rgba(245, 158, 11, 0.15); color: var(--compass-gold); }
.verdict-label.skip { background: rgba(239, 68, 68, 0.15); color: var(--danger-red); }

/* --- About Page --- */
.about-content {
  max-width: 720px;
  margin: 0 auto;
}

.about-content p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.9;
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.score-category {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
}

.score-category .category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.score-category h4 {
  font-size: 1rem;
}

.score-category .weight {
  color: var(--cave-purple);
  font-weight: 700;
  font-size: 0.9rem;
}

/* --- Verdict Table --- */
.verdict-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.verdict-table th,
.verdict-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.verdict-table th {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.verdict-table td {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Disclosure Page --- */
.disclosure-content {
  max-width: 720px;
  margin: 0 auto;
}

.disclosure-content p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.9;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.25rem 0;
}
.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  z-index: 200;
  display: none;
}

.cookie-banner.show { display: block; }

.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

.cookie-actions button {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
}

.cookie-accept {
  background: var(--cave-purple);
  color: white;
}

.cookie-decline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle) !important;
}

/* --- Page Header (for inner pages) --- */
.page-header {
  padding: 7rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header .page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* --- Affiliate Note (inline on review pages) --- */
.affiliate-note {
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 2rem 0;
}

.affiliate-note a {
  color: var(--cave-purple);
}

/* --- 404 --- */
.not-found {
  text-align: center;
  padding: 10rem 0;
}

.not-found h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.not-found p {
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .hero { padding: 6rem 0 3rem; }
  .email-form { flex-direction: column; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 1.5rem; }
  .score-breakdown { grid-template-columns: 1fr; }
  .hero .proof-bar { flex-direction: column; align-items: center; gap: 0.75rem; }
}
