/**
 * What's My Contract - Global Styles
 * Aesthetic: Professional, Secure, Modern. High contrast, clean typography.
 */

 :root {
    --bg-dark: #0f1115;
    --bg-card: #16191f;
    --bg-card-hover: #1c2028;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent: #3b82f6; /* Trust blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --accent-hover: #2563eb;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --border: #334155;
    
    --radius: 12px;
    --radius-lg: 20px;
  }
  
  * { box-sizing: border-box; margin: 0; padding: 0; }
  
  body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  
  a { color: var(--accent); text-decoration: none; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
  a:hover { color: var(--accent-hover); }
  
  .hidden { display: none !important; }
  .w-full { width: 100%; }
  
  /* --- Layout & Typography --- */
  
  .navbar {
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    background: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(12px);
    z-index: 100;
  }
  
  .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
  }
  
  .nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
  
  .nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
  }
  
  .nav-link:hover {
    color: var(--text-primary);
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    outline: none;
  }
  
  .btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px 0 var(--accent-glow);
  }
  
  .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px 0 var(--accent-glow);
  }
  
  .btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
  }
  
  .btn-outline:hover {
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
  }
  
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
  }
  
  /* --- Hero Section --- */
  .hero {
    max-width: 900px;
    margin: 4rem auto 2rem;
    padding: 0 2rem;
    text-align: center;
  }
  
  .pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2rem;
  }
  
  .pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    animation: pulsing 2s infinite;
  }
  
  @keyframes pulsing {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
  }
  
  .hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
  }
  
  .highlight-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  .subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
  }
  
  .trust-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
  }
  
  .trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
  }
  
  /* --- Upload Dropzone --- */
  .upload-container {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
  }
  
  .upload-container.dragover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
  }
  
  .upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .upload-icon {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
  }
  
  .upload-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
  }
  
  .upload-container p {
    color: var(--text-secondary);
    font-size: 0.95rem;
  }
  
  .upload-btn-wrapper {
    margin-top: 1.5rem;
  }
  
  /* Scanning Animation */
  .scanning-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }
  
  .scan-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0deg, transparent 60deg);
    animation: rotate 1.5s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
  }
  
  .scan-ring-inner {
    width: 72px;
    height: 72px;
    background: var(--bg-card);
    border-radius: 50%;
  }
  
  @keyframes rotate {
    to { transform: rotate(360deg); }
  }
  
  .progress-bar {
    width: 60%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
  }
  
  .progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
  }
  
  /* --- Results Section --- */
  .results-section {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
  }
  
  .results-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .card-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
  }
  
  .card h3, .flags-container h3 {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
  }
  
  .legal-text {
    font-family: 'Merriweather', serif;
    font-size: 1.05rem;
    line-height: 1.8;
  }
  
  /* Risk Gauge Placeholder */
  .risk-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1.5rem 0;
  }
  .gauge-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--warning);
    line-height: 1;
  }
  h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); font-weight: 700; letter-spacing: -1px; margin-bottom: 1rem; line-height: 1.1; }
  h2 { font-size: clamp(2rem, 4vw + 0.5rem, 3rem); font-weight: 600; letter-spacing: -0.5px; margin-bottom: 0.5rem; }
  h3 { font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem); font-weight: 600; margin-bottom: 0.5rem; color: var(--text-primary); }
  .gauge-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-top: 0.5rem;
  }
  
  /* Red Flags List */
  .flags-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 3rem;
  }
  
  .flag-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .flag-item {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--border);
  }
  
  .flag-item.red { border-left-color: var(--danger); }
  .flag-item.yellow { border-left-color: var(--warning); }
  
  .flag-item strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
  }
  
  /* BLUR / PAYWALL logic */
  .blur-content {
    filter: blur(8px);
    user-select: none;
    opacity: 0.7;
    pointer-events: none;
  }
  
  .paywall-banner {
    position: relative;
    margin-top: -150px;
    z-index: 10;
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(to top, var(--bg-dark) 50%, transparent);
  }
  
  .paywall-content {
    background: rgba(15, 17, 21, 0.95);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .paywall-content svg {
    color: var(--accent);
  }
  
  /* --- Modals --- */
  .modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  
  .modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    position: relative;
  }
  
  .close-modal {
    position: absolute;
    top: 1rem; right: 1.5rem;
    background: none; border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  .modal h2 {
    margin-bottom: 0.5rem;
  }
  
  .modal p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
  }
  
  .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
  }
  
  .form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
  }
  
  .form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
  }
  
  .form-group input:focus {
    outline: none;
    border-color: var(--accent);
  }
  
  .auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
  }
  
  /* --- Trust Badge --- */
  .secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  
  .secure-badge svg {
    color: var(--primary);
  }

  /* --- Footer --- */
  footer {
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
    margin-top: 6rem;
    background: rgba(0,0,0,0.2);
  }
  
  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
  }
  
  .footer-left {
    max-width: 400px;
  }
  
  .footer-left .logo {
    margin-bottom: 1rem;
  }
  
  .disclaimer {
    color: var(--text-muted);
    font-size: 0.85rem;
  }
  
  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-links h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
  }
  
  .footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
  }

  /* Ecosystem Footer */
  .site-footer {
    border-top: 1px solid var(--border);
    padding: 4rem 2rem;
    margin-top: 2rem;
    background: rgba(0,0,0,0.2);
  }

  .site-footer .footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
  }

  .site-footer .footer-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
  }

  .site-footer .footer-links {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }
  
  .site-footer .footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
  }
  
  .site-footer .footer-links a:hover {
    color: var(--text-primary);
  }

  .site-footer .footer-bottom {
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: #888;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .card-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
    .footer-content { flex-direction: column; }
    .site-footer .footer-content { flex-direction: column; align-items: flex-start; }
    .site-footer .footer-links { flex-direction: column; gap: 1rem; }
    .trust-indicators { flex-direction: column; gap: 1rem; align-items: center; }
  }
