/* === Mockarty Website — CSS Variables & Base === */
/* Core design tokens (colors, base typography, spacing) loaded from tokens.css (internal/designsystem).
   Website overrides below for marketing-specific scale and extra variables. */

/* Light Theme — website overrides */
html.light {
    /* Website-specific variables */
    --bg-card: #ffffff;
    --bg-code: #e3eaf4;
    --bg-hero: linear-gradient(135deg, #1a73d4 0%, #2d8cf0 50%, #64b5ff 100%);
    --bg-hero-overlay: rgba(255,255,255,0.08);
    --text-inverse: #ffffff;
    --accent-light: rgba(45,140,240,0.1);
    --accent-gradient: linear-gradient(135deg, #2d8cf0 0%, #64b5ff 100%);
    --border-light: #e3eaf4;
    --info-color: #3b82f6;
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    --check-color: #10b981;
    --cross-color: #ef4444;
    --table-stripe: rgba(0,0,0,0.02);
    --nav-bg: rgba(255,255,255,0.92);

    /* Larger typography for marketing pages */
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-md: 1.125rem;
    --font-lg: 1.25rem;
    --font-xl: 1.5rem;
    --font-2xl: 2rem;
    --font-3xl: 2.5rem;
    --font-4xl: 3.5rem;
}

/* Dark Theme (default) — website overrides */
html.dark {
    /* Website-specific variables */
    --bg-card: #0e1524;
    --bg-code: #151e30;
    --bg-hero: linear-gradient(135deg, #080d18 0%, #0e1524 50%, #151e30 100%);
    --bg-hero-overlay: rgba(45,140,240,0.08);
    --text-inverse: #ffffff;
    --accent-light: rgba(45,140,240,0.1);
    --accent-gradient: linear-gradient(135deg, #64b5ff 0%, #2d8cf0 100%);
    --border-light: #151e30;
    --info-color: #60a5fa;
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);
    --check-color: #34d399;
    --cross-color: #f87171;
    --table-stripe: rgba(255,255,255,0.02);
    --nav-bg: rgba(8,13,24,0.92);

    /* Larger typography for marketing pages */
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-md: 1.125rem;
    --font-lg: 1.25rem;
    --font-xl: 1.5rem;
    --font-2xl: 2rem;
    --font-3xl: 2.5rem;
    --font-4xl: 3.5rem;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { color: var(--accent-color); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; font-weight: 700; }

/* === Typography === */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(45,140,240,0.4);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(45,140,240,0.5);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--accent-light);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}
.btn-outline:hover {
    background: var(--accent-color);
    color: white;
}

.btn-lg {
    padding: 14px 32px;
    font-size: var(--font-md);
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 6px 14px;
    font-size: var(--font-xs);
}

.btn-accent {
    background: var(--success-color);
    color: white;
    box-shadow: 0 4px 14px rgba(16,185,129,0.4);
}
.btn-accent:hover {
    box-shadow: 0 6px 20px rgba(16,185,129,0.5);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}
.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning { background: var(--warning-color); color: #fff; }
.btn-warning:hover { opacity: 0.9; }

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}
.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--accent-light);
    color: var(--accent-color);
    font-size: 1.25rem;
    margin-bottom: 16px;
}

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-base);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.form-textarea { min-height: 120px; resize: vertical; }
.consent-label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: var(--font-sm); color: var(--text-secondary); line-height: 1.4; }
.consent-label input[type="checkbox"] { margin-top: 3px; accent-color: var(--accent-color); flex-shrink: 0; }
.consent-label a { color: var(--accent-color); text-decoration: underline; }

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: var(--font-xs);
    font-weight: 600;
    gap: 4px;
}
.badge-primary { background: var(--accent-light); color: var(--accent-color); }
.badge-success { background: rgba(16,185,129,0.1); color: var(--success-color); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger-color); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning-color); }
.badge-info { background: rgba(59,130,246,0.1); color: var(--info-color); }

/* === Section === */
.section {
    padding: 80px 0;
}
.section-title {
    font-size: var(--font-3xl);
    font-weight: 800;
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: var(--font-lg);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 48px;
}

/* === Grid === */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* === Table === */
.table-responsive { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}
tr:nth-child(even) { background: var(--table-stripe); }

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal-overlay .modal {
    display: block;
    position: static;
    width: 90%;
    height: auto;
    overflow: visible;
    background: var(--bg-card);
    backdrop-filter: none;
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.modal-title { font-size: var(--font-xl); font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}
.modal-close:hover { color: var(--text-primary); }

/* === Notification === */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: 500;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
}
.notification-success { background: var(--success-color); color: white; }
.notification-error { background: var(--danger-color); color: white; }
.notification-info { background: var(--info-color); color: white; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* === Responsive === */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .section { padding: 48px 0; }
    .section-title { font-size: var(--font-2xl); }
    .section-subtitle { font-size: var(--font-base); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .btn-lg { padding: 12px 24px; font-size: var(--font-base); }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .section { padding: 32px 0; }
}

/* === Utilities === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }
.relative { position: relative; }
.w-full { width: 100%; }

/* Focus-visible styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(45, 140, 240, 0.2);
}

.platform-tab:focus-visible,
.arch-tab:focus-visible,
.protocol-tab:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}
