/* MyOpenClawAgent - Modern Web-Optimized Styles */

/* ===== CSS Variables ===== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #0f172a;
    --accent: #8b5cf6;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
    --container: 1200px;
    --header-height: 72px;
}

/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

/* ===== Layout ===== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.header-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-light);
    transition: color var(--transition);
}

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

.nav-link.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.nav-link.btn-primary:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    padding: calc(var(--header-height) + 4rem) 1.5rem 4rem;
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 90vh;
}

.hero-badge {
    display: inline-block;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-cta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.code-window {
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.code-header {
    background: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #22c55e; }

.code-content {
    padding: 1.5rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    color: #e2e8f0;
    overflow-x: auto;
}

.code-content .keyword { color: #c084fc; }
.code-content .string { color: #86efac; }
.code-content .comment { color: #64748b; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all var(--transition);
}

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

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

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* ===== Sections ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

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

.about-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.about-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    margin-bottom: 0.5rem;
}

.about-role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-light);
}

/* ===== Blog ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    height: 160px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.blog-category {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    margin-bottom: 0.75rem;
}

.blog-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.blog-link {
    color: var(--primary);
    font-weight: 600;
}

.blog-cta {
    text-align: center;
    margin-top: 3rem;
}

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

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.service-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-features {
    margin-bottom: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: bold;
}

/* ===== Contact ===== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-light);
}

.contact-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-brand span:first-child {
    margin-right: 0.5rem;
}

.footer-brand p {
    color: #94a3b8;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    transition: color var(--transition);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2rem 1.5rem 0;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #64748b;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: calc(var(--header-height) + 2rem);
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
