/* PreMRR Custom Design System */
/* Primary: #1E3A8A (Navy), Secondary: #475569 (Slate), Accent: #FF6B35 (Coral) */
/* Background: #F8FAFC (Porcelain), Text: #0F172A (Dark Navy) */
/* Fonts: DM Sans (headings), Work Sans (body) */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Work+Sans:wght@400;500;600;700&display=swap');

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

/* CSS Custom Properties */
:root {
    --primary: #1E3A8A;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #475569;
    --accent: #FF6B35;
    --background: #F8FAFC;
    --foreground: #0F172A;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card: #ffffff;
    --card-hover: #f1f5f9;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* 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;
    }
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background: var(--background);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Skip to Content Link (Accessibility) */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 9999;
    font-weight: 600;
}

.skip-to-content:focus {
    top: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInHero {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-hero {
    animation: fadeInHero 0.8s ease-out forwards;
}

.animate-slide-in {
    animation: slideInFromLeft 0.6s ease-out forwards;
}

.animate-scale {
    animation: scaleIn 0.4s ease-out forwards;
}

/* Stagger delays */
.problem-card:nth-child(1) {
    animation: fadeIn 0.6s ease-out 0.1s backwards;
}

.problem-card:nth-child(2) {
    animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.problem-card:nth-child(3) {
    animation: fadeIn 0.6s ease-out 0.3s backwards;
}

.problem-card:nth-child(4) {
    animation: fadeIn 0.6s ease-out 0.4s backwards;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: -0.5px;
}

.logo:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.logo:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
    color: var(--primary);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 4px;
}

.hamburger {
    width: 24px;
    height: 2.5px;
    background: var(--foreground);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(135deg, #f0f4f8 0%, var(--background) 50%, #e0e7ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="wave" x="0" y="0" width="120" height="120" patternUnits="userSpaceOnUse"><path d="M0,60 Q30,30 60,60 T120,60" fill="none" stroke="rgba(30,58,138,0.05)" stroke-width="1"/></pattern></defs><rect width="1200" height="600" fill="url(%23wave)"/></svg>');
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--foreground);
    animation: fadeInHero 0.8s ease-out forwards;
    letter-spacing: -1px;
}

.hero h1 strong {
    color: var(--accent);
}

.hero-subheadline {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: var(--secondary);
    margin-bottom: 2.5rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    animation: fadeInHero 0.8s ease-out 0.2s backwards;
}

.hero-products {
    display: block;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.cta-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: fadeInHero 0.8s ease-out 0.4s backwards;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    font-family: 'Work Sans', sans-serif;
    letter-spacing: 0.3px;
}

.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4);
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--foreground);
    border: 2px solid var(--border);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 107, 53, 0.05);
    transform: translateY(-2px);
}

.btn-product {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-product:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Section Container */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--foreground);
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--secondary);
    font-size: clamp(1rem, 2vw, 1.125rem);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Why PreMRR Section */
.why-premrr {
    padding: 6rem 2rem;
    background: var(--background);
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.problem-card {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.problem-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 107, 53, 0.02) 100%);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.problem-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.problem-card p {
    color: var(--secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Target Users Section */
.target-users {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.02) 0%, rgba(255, 107, 53, 0.02) 100%);
}

.target-users h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    color: var(--foreground);
}

.users-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.user-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.user-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.user-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.user-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.user-card p {
    color: var(--secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Ecosystem Section */
.ecosystem {
    padding: 6rem 2rem;
    background: var(--background);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.product-card {
    position: relative;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    background: white;
    border: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

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

.free-tier {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, white 100%);
}

.product-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.free-tier .product-badge {
    background: var(--success);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.product-card > p {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex-grow: 1;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.feature {
    color: var(--secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}

.product-card .btn {
    margin-top: auto;
}

/* FAQ Section */
.faq {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.02) 0%, rgba(255, 107, 53, 0.02) 100%);
}

.faq h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.faq-item summary {
    padding: 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--foreground);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: all 0.3s ease;
}

.faq-item summary:hover {
    background: var(--card-hover);
    color: var(--accent);
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--secondary);
    line-height: 1.8;
}

.faq-content ul {
    list-style: none;
    padding-left: 1rem;
    margin: 1rem 0;
}

.faq-content li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.faq-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Footer */
footer {
    padding: 4rem 2rem 2rem;
    background: var(--foreground);
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.twitter-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-links a:hover {
    color: var(--accent);
}

.social-links a:hover {
    color: var(--accent);
}

.social-links svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.trust-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100vw;
        background: var(--background);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        gap: 2rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem 2rem;
        border-radius: 12px;
        font-size: 1.1rem;
        font-weight: 600;
        transition: all 0.2s ease;
    }
    
    .nav-links a:hover {
        background: var(--card-hover);
        transform: scale(1.05);
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .hero {
        padding: 5rem 1.5rem 3rem;
        min-height: auto;
        padding-top: 8rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .why-premrr,
    .ecosystem,
    .faq {
        padding: 4rem 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero-subheadline {
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    nav,
    .cta-buttons,
    footer,
    .mobile-menu-toggle {
        display: none;
    }
    
    body {
        background: white;
    }
}