/**
 * Shared “marketing template” layout — token-based (no hex).
 * Replaces giant inline <style> blocks on services, contact, apps, pricing, etc.
 * Load after xenosoft-brand.css + modern-2026.css; before xeno-type-bridge.css.
 */
@import url("theme-tokens.css");

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin-left: 0 !important;
}

main,
main#main-content {
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

main#main-content {
    padding-top: 0;
    margin-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons: prefer xenosoft-brand + xeno-type-bridge; legacy gradients removed */

.card {
    background: var(--xeno-surface);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--xeno-border);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--xeno-accent), color-mix(in srgb, var(--xeno-accent) 45%, var(--xeno-cta) 55%));
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--xeno-accent);
}

.card:hover::before {
    opacity: 1;
}

.nav-link {
    color: var(--color-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-link:hover {
    color: var(--xeno-accent);
    background-color: var(--xeno-accent-soft);
}

.nav-link.active {
    color: var(--xeno-accent);
    background-color: var(--xeno-accent-soft);
}

.hero-section {
    padding: 8rem 0 6rem;
    background: linear-gradient(
        135deg,
        var(--xeno-page) 0%,
        var(--xeno-surface) 50%,
        var(--xeno-page) 100%
    );
    position: relative;
    z-index: 1;
    overflow: hidden;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section .container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 2;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(
        circle,
        color-mix(in srgb, var(--xeno-accent) 12%, transparent) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
    text-align: center;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-muted);
    margin-bottom: 2.5rem;
    max-width: 700px;
    line-height: 1.6;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex !important;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center !important;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1000px;
    justify-items: center !important;
}

.hero-stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--xeno-surface);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--xeno-border);
}

.hero-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--xeno-accent);
}

.hero-stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--xeno-accent);
}

.hero-stat-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

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

.section {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-muted);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

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

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

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

.footer {
    background: var(--xeno-footer-bg);
    color: var(--xeno-footer-text);
    padding: 3rem 0 2rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--xeno-footer-text);
}

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

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

.footer-section a {
    color: var(--xeno-footer-muted);
    text-decoration: none;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.footer-bottom {
    border-top: 1px solid var(--xeno-footer-border);
    padding-top: 2rem;
    text-align: center;
    color: var(--xeno-footer-muted);
}

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

.top-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--xeno-surface);
    border-bottom: 1px solid var(--xeno-border);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 0.75rem 1rem;
}

.top-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-nav-logo {
    height: 2.5rem;
    width: auto;
}

.top-nav-toggle {
    background: transparent;
    border: 2px solid var(--xeno-border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.top-nav-toggle:hover {
    background: var(--xeno-page);
    border-color: var(--xeno-accent);
}

.top-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--xeno-surface);
    border-top: 1px solid var(--xeno-border);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.top-nav-menu.active {
    display: block;
}

.top-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--color-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--xeno-n-100);
    transition: all 0.2s ease;
    font-weight: 500;
}

.top-nav-link:hover,
.top-nav-link.active {
    background: var(--xeno-page);
    color: var(--xeno-accent);
}

.top-nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.top-nav-link span {
    flex: 1;
}

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }

    .top-nav {
        display: block;
    }

    body {
        padding-top: 4.5rem;
        margin-left: 0 !important;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.875rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .top-nav {
        display: none !important;
    }

    body {
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Contact form field chrome (submit button uses global .btn-primary + bridge) */
.contact-form .form-input,
.contact-form .form-select,
.contact-form .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem !important;
    font-size: 0.9375rem !important;
    min-height: 44px !important;
    border: 2px solid var(--xeno-border);
    border-radius: 12px;
    transition: all 0.2s ease;
    background: var(--xeno-surface);
    color: var(--color-text);
}

.contact-form .form-textarea {
    min-height: 120px !important;
    resize: vertical;
}

.contact-form .form-input:focus,
.contact-form .form-select:focus,
.contact-form .form-textarea:focus {
    outline: none;
    border-color: var(--xeno-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--xeno-accent) 15%, transparent);
}

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

.contact-form .form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .contact-form .form-input,
    .contact-form .form-select,
    .contact-form .form-textarea {
        padding: 0.75rem 1rem !important;
        font-size: 16px !important;
        min-height: 44px !important;
    }

    #contact-form h2,
    #contact-form p {
        text-align: center !important;
    }
}
