/* 
 * Dabbler Website Styles
 * Mobile-first, responsive design
 * Sports-tech aesthetic with dark text on white background
 */

/* ==================== */
/* Base Styles & Reset */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand colors (from logoTypo.svg) */
    --brand-color: #7328CE;
    --brand-dark: #5b1fa3;
    --brand-light: #9b6cff;
    --brand-tint: rgba(115, 40, 206, 0.10);

    /* Color palette - clean sports-tech */
    --primary-color: #141414;
    --secondary-color: var(--brand-color);
    --accent-color: var(--brand-color);
    --text-color: #1a1a1a;
    --text-light: #555;
    --bg-white: #ffffff;
    --bg-light: #f7f5fb;
    --border-color: #e6e0f2;
    
    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Layout */
    --max-width: 1200px;
    --border-radius: 8px;
}

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

/* ==================== */
/* Typography */
/* ==================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 1.75rem;
    margin-top: var(--spacing-lg);
}

h3 {
    font-size: 1.5rem;
    margin-top: var(--spacing-md);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

/* ==================== */
/* Header & Navigation */
/* ==================== */

header {
    background-color: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 2px 0;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-brand:hover {
    color: var(--brand-dark);
    text-decoration: none;
}

.nav-logo {
    height: 22px;
    width: auto;
    display: block;
}

/* Screen-reader-only text for accessible labels */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    list-style: none;
}

.nav-links li {
    display: inline;
}

.nav-links a {
    color: var(--text-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--brand-tint);
    color: var(--brand-dark);
    text-decoration: none;
}

/* ==================== */
/* Main Content */
/* ==================== */

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-sm);
    min-height: calc(100vh - 200px);
}

/* ==================== */
/* Hero Section (Home) */
/* ==================== */

.hero {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    font-weight: 400;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ==================== */
/* Features/Highlights */
/* ==================== */

.features {
    margin: var(--spacing-xl) 0;
}

.features h2 {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
}

.feature-item {
    background-color: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--brand-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-top: 0;
    color: var(--primary-color);
}

.feature-item p {
    margin-bottom: 0;
}

/* ==================== */
/* Buttons & CTAs */
/* ==================== */

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
    margin: var(--spacing-lg) 0;
}

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    min-width: 200px;
}

.btn-primary {
    background-color: var(--brand-color);
    color: var(--bg-white);
    border-color: var(--brand-color);
}

.btn-primary:hover {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(115, 40, 206, 0.28);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.btn-secondary:hover {
    background-color: var(--brand-color);
    color: var(--bg-white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(115, 40, 206, 0.20);
}

/* ==================== */
/* Legal Pages Content */
/* ==================== */

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.legal-content .last-updated {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-sm);
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.legal-content ul,
.legal-content ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.legal-content li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
}

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

.contact-info {
    background-color: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-lg);
    border-left: 4px solid var(--accent-color);
}

/* ==================== */
/* Footer */
/* ==================== */

footer {
    background-color: var(--brand-dark);
    color: var(--bg-white);
    padding: var(--spacing-lg) var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

footer p {
    color: var(--bg-white);
    margin-bottom: var(--spacing-xs);
}

footer a {
    color: var(--bg-white);
    text-decoration: underline;
}

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

/* ==================== */
/* Responsive Design */
/* ==================== */

/* Tablet and up */
@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.5rem;
    }
    
    .features-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    main {
        padding: var(--spacing-xl) var(--spacing-md);
    }
}

/* Desktop and up */
@media (min-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .features-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== */
/* Utility Classes */
/* ==================== */

.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* ==================== */
/* Accessibility */
/* ==================== */

:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Ensure sufficient color contrast */
@media (prefers-contrast: high) {
    :root {
        --text-light: #333;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
