/**
 * GEO-Score Design System
 * Standalone CSS for blogs.geo-score.online
 *
 * Usage:
 * 1. Include Google Fonts in your HTML:
 *    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
 *
 * 2. Include this CSS file:
 *    <link rel="stylesheet" href="https://geo-score.online/design-system/geo-score.css">
 */

/* ==============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================== */

:root {
  /* ========== BRAND COLORS ========== */
  --geo-primary: #5B9FED;
  --geo-primary-hover: #4A8DD9;
  --geo-primary-light: #7AB3F0;
  --geo-primary-dark: #3B7DC5;

  /* ========== BACKGROUND COLORS ========== */
  --geo-bg-main: #0F1629;
  --geo-bg-card: #1a2332;
  --geo-bg-elevated: #22303f;

  /* ========== TEXT COLORS ========== */
  --geo-text-primary: rgb(255 255 255);
  --geo-text-secondary: rgb(255 255 255 / 0.9);
  --geo-text-tertiary: rgb(255 255 255 / 0.8);
  --geo-text-muted: rgb(255 255 255 / 0.7);
  --geo-text-subtle: rgb(255 255 255 / 0.6);
  --geo-text-faint: rgb(255 255 255 / 0.5);

  /* ========== BORDER COLORS ========== */
  --geo-border-default: rgb(255 255 255 / 0.1);
  --geo-border-strong: rgb(255 255 255 / 0.2);
  --geo-border-primary: #5B9FED;

  /* ========== SEMANTIC COLORS ========== */
  --geo-success: #10B981;
  --geo-success-bg: rgba(16, 185, 129, 0.1);
  --geo-warning: #F59E0B;
  --geo-warning-bg: rgba(245, 158, 11, 0.1);
  --geo-error: #EF4444;
  --geo-error-bg: rgba(239, 68, 68, 0.1);
  --geo-info: #3B82F6;
  --geo-info-bg: rgba(59, 130, 246, 0.1);

  /* ========== TYPOGRAPHY ========== */
  --geo-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --geo-font-mono: 'Fira Code', 'Courier New', monospace;

  /* Font Sizes */
  --geo-text-xs: 0.75rem;
  --geo-text-sm: 0.875rem;
  --geo-text-base: 1rem;
  --geo-text-lg: 1.125rem;
  --geo-text-xl: 1.25rem;
  --geo-text-2xl: 1.5rem;
  --geo-text-3xl: 1.875rem;
  --geo-text-4xl: 2.25rem;
  --geo-text-5xl: 3rem;

  /* ========== SPACING ========== */
  --geo-space-1: 0.25rem;
  --geo-space-2: 0.5rem;
  --geo-space-3: 0.75rem;
  --geo-space-4: 1rem;
  --geo-space-6: 1.5rem;
  --geo-space-8: 2rem;
  --geo-space-12: 3rem;
  --geo-space-16: 4rem;

  /* ========== BORDER RADIUS ========== */
  --geo-radius-sm: 0.125rem;
  --geo-radius-base: 0.25rem;
  --geo-radius-md: 0.375rem;
  --geo-radius-lg: 0.5rem;
  --geo-radius-xl: 0.75rem;
  --geo-radius-2xl: 1rem;
  --geo-radius-full: 9999px;

  /* ========== SHADOWS ========== */
  --geo-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --geo-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --geo-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --geo-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --geo-shadow-glow: 0 0 20px rgba(91, 159, 237, 0.3);

  /* ========== TRANSITIONS ========== */
  --geo-transition-fast: 150ms;
  --geo-transition-base: 200ms;
  --geo-transition-slow: 300ms;
  --geo-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================================
   BASE STYLES (Opt-in with .geo-theme class)
   ============================================== */

.geo-theme {
  font-family: var(--geo-font-sans);
  background-color: var(--geo-bg-main);
  color: var(--geo-text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.geo-theme h1,
.geo-theme h2,
.geo-theme h3,
.geo-theme h4,
.geo-theme h5,
.geo-theme h6 {
  color: var(--geo-text-primary);
  font-weight: 700;
  line-height: 1.25;
}

.geo-theme h1 { font-size: var(--geo-text-5xl); }
.geo-theme h2 { font-size: var(--geo-text-4xl); }
.geo-theme h3 { font-size: var(--geo-text-3xl); }
.geo-theme h4 { font-size: var(--geo-text-2xl); }
.geo-theme h5 { font-size: var(--geo-text-xl); }
.geo-theme h6 { font-size: var(--geo-text-lg); }

.geo-theme p {
  color: var(--geo-text-secondary);
  margin-bottom: var(--geo-space-4);
}

.geo-theme a {
  color: var(--geo-primary);
  text-decoration: none;
  transition: color var(--geo-transition-base) var(--geo-ease);
}

.geo-theme a:hover {
  color: var(--geo-primary-hover);
}

/* ==============================================
   COMPONENTS
   ============================================== */

/* Buttons */
.geo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--geo-space-3) var(--geo-space-6);
  font-family: var(--geo-font-sans);
  font-weight: 600;
  font-size: var(--geo-text-base);
  border-radius: var(--geo-radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--geo-transition-base) var(--geo-ease);
  text-decoration: none;
}

.geo-btn-primary {
  background-color: var(--geo-primary);
  color: white;
  box-shadow: var(--geo-shadow-md);
}

.geo-btn-primary:hover {
  background-color: var(--geo-primary-hover);
  box-shadow: var(--geo-shadow-lg);
  transform: translateY(-2px);
}

.geo-btn-secondary {
  background-color: rgb(255 255 255 / 0.1);
  color: white;
  border: 1px solid rgb(255 255 255 / 0.1);
}

.geo-btn-secondary:hover {
  background-color: rgb(255 255 255 / 0.2);
}

.geo-btn-outline {
  background-color: transparent;
  color: var(--geo-primary);
  border: 2px solid var(--geo-primary);
}

.geo-btn-outline:hover {
  background-color: var(--geo-primary);
  color: white;
}

/* Cards */
.geo-card {
  background-color: var(--geo-bg-card);
  border: 1px solid var(--geo-border-default);
  border-radius: var(--geo-radius-2xl);
  padding: var(--geo-space-6);
  box-shadow: var(--geo-shadow-lg);
  transition: box-shadow var(--geo-transition-slow) var(--geo-ease);
}

.geo-card:hover {
  box-shadow: var(--geo-shadow-xl);
}

.geo-card-elevated {
  background-color: var(--geo-bg-elevated);
  border: 1px solid var(--geo-border-strong);
  border-radius: var(--geo-radius-2xl);
  padding: var(--geo-space-6);
  box-shadow: var(--geo-shadow-xl);
}

/* Inputs */
.geo-input {
  width: 100%;
  padding: var(--geo-space-3) var(--geo-space-4);
  background-color: var(--geo-bg-main);
  border: 2px solid var(--geo-border-strong);
  border-radius: var(--geo-radius-lg);
  color: var(--geo-text-primary);
  font-family: var(--geo-font-sans);
  font-size: var(--geo-text-base);
  transition: all var(--geo-transition-base) var(--geo-ease);
}

.geo-input::placeholder {
  color: var(--geo-text-faint);
}

.geo-input:focus {
  outline: none;
  border-color: var(--geo-primary);
  box-shadow: 0 0 0 4px rgba(91, 159, 237, 0.2);
}

/* Badges */
.geo-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--geo-space-1) var(--geo-space-3);
  border-radius: var(--geo-radius-full);
  font-size: var(--geo-text-sm);
  font-weight: 500;
}

.geo-badge-success {
  background-color: var(--geo-success-bg);
  color: var(--geo-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.geo-badge-warning {
  background-color: var(--geo-warning-bg);
  color: var(--geo-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.geo-badge-error {
  background-color: var(--geo-error-bg);
  color: var(--geo-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.geo-badge-info {
  background-color: rgba(91, 159, 237, 0.1);
  color: var(--geo-primary);
  border: 1px solid rgba(91, 159, 237, 0.2);
}

/* ==============================================
   GRADIENTS
   ============================================== */

.geo-gradient-hero {
  background: linear-gradient(180deg, #0F1629 0%, #1E3A5F 50%, #5B9FED 100%);
}

.geo-gradient-accent {
  background: linear-gradient(135deg, #5B9FED 0%, #7AB3F0 100%);
}

.geo-gradient-dark {
  background: linear-gradient(135deg, #0F1629 0%, #1E3A5F 100%);
}

/* ==============================================
   UTILITIES
   ============================================== */

.geo-text-primary { color: var(--geo-text-primary); }
.geo-text-secondary { color: var(--geo-text-secondary); }
.geo-text-muted { color: var(--geo-text-muted); }
.geo-text-brand { color: var(--geo-primary); }

.geo-bg-main { background-color: var(--geo-bg-main); }
.geo-bg-card { background-color: var(--geo-bg-card); }
.geo-bg-elevated { background-color: var(--geo-bg-elevated); }

.geo-glow {
  box-shadow: var(--geo-shadow-glow);
}

.geo-glow-strong {
  box-shadow: 0 0 40px rgba(91, 159, 237, 0.5);
}

/* ==============================================
   3D PRISM LOGO
   ============================================== */

.geo-prism-container {
  perspective: 1000px;
  display: inline-block;
}

.geo-prism {
  position: relative;
  width: 40px;
  height: 40px;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(0deg);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.geo-prism:hover {
  transform: rotateX(-20deg) rotateY(360deg);
}

.geo-prism-face {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
    rgba(91, 159, 237, 0.25),
    rgba(74, 141, 217, 0.2),
    rgba(122, 179, 240, 0.25)
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  border: 1px solid rgba(91, 159, 237, 0.4);
  transition: all 0.6s;
}

.geo-prism-face::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg,
    transparent,
    rgba(91, 159, 237, 0.35),
    transparent
  );
  animation: geo-shimmer 3s infinite;
}

@keyframes geo-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.geo-prism-face.f1 { transform: translateZ(20px); }
.geo-prism-face.f2 { transform: rotateY(120deg) translateZ(20px); }
.geo-prism-face.f3 { transform: rotateY(240deg) translateZ(20px); }

.geo-prism:hover .geo-prism-face {
  background: linear-gradient(135deg,
    rgba(91, 159, 237, 0.4),
    rgba(74, 141, 217, 0.35),
    rgba(122, 179, 240, 0.4)
  );
  box-shadow: 0 0 30px rgba(91, 159, 237, 0.5);
  border-color: rgba(122, 179, 240, 0.6);
}

/* Prism Sizes */
.geo-prism-sm { width: 32px; height: 32px; }
.geo-prism-sm .geo-prism-face.f1 { transform: translateZ(15px); }
.geo-prism-sm .geo-prism-face.f2 { transform: rotateY(120deg) translateZ(15px); }
.geo-prism-sm .geo-prism-face.f3 { transform: rotateY(240deg) translateZ(15px); }

.geo-prism-lg { width: 48px; height: 48px; }
.geo-prism-lg .geo-prism-face.f1 { transform: translateZ(25px); }
.geo-prism-lg .geo-prism-face.f2 { transform: rotateY(120deg) translateZ(25px); }
.geo-prism-lg .geo-prism-face.f3 { transform: rotateY(240deg) translateZ(25px); }

/* Logo with text */
.geo-logo-full {
  display: flex;
  align-items: center;
  gap: var(--geo-space-3);
}

.geo-logo-text {
  font-family: var(--geo-font-sans);
  font-size: var(--geo-text-xl);
  font-weight: 700;
  color: var(--geo-text-primary);
}

.geo-logo-text-accent {
  color: var(--geo-primary);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .geo-prism,
  .geo-prism-face {
    transition: none;
  }
  .geo-prism-face::before {
    animation: none;
  }
}
