/*
 * SEDL - Site sedl.pro
 * Design system alinhado com CVGHR, InventoX e EasyTask
 * @version 1.0
 */

/* ==================== CSS VARIABLES (Design Tokens) ==================== */
:root {
    /* Cores Primárias */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;

    /* Cores Secundárias */
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-400: #94a3b8;
    --secondary-500: #64748b;
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;

    /* Cores de Destaque por Sistema */
    --cvghr-accent: #0284c7;
    --inventox-accent: #16a34a;
    --taska-accent: #7c3aed;

    /* Tipografia */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Espaçamentos */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Bordas e Raios */
    --radius-sm: 0.125rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transições */
    --transition-fast: 0.15s ease-out;
    --transition-base: 0.25s ease-out;
    --transition-slow: 0.4s ease-out;

    /* Navbar */
    --navbar-height: 56px;
}

/* ==================== RESET E BASE ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--secondary-800);
    background-color: var(--secondary-50);
    margin: 0;
    padding: 0;
    padding-top: var(--navbar-height);
    overflow-x: hidden;
}

/* ==================== LAYOUT ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-6);
    }
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
    color: white;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: white;
    opacity: 0.9;
}

.navbar-logo {
    height: 32px;
    width: auto;
    display: block;
}

@media (max-width: 480px) {
    .navbar-logo {
        height: 28px;
    }
}

.navbar-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.navbar-toggler:hover,
.navbar-toggler:focus {
    background: rgba(255, 255, 255, 0.1);
    outline: 2px solid white;
    outline-offset: 2px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    content: '\f00d';
}

.navbar-toggler-icon {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.25rem;
}

.navbar-toggler-icon::before {
    content: '\f0c9';
}

.navbar-collapse {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-700);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
}

.navbar-collapse.is-open {
    display: block;
}

@media (min-width: 768px) {
    .navbar-toggler {
        display: none;
    }

    .navbar-collapse {
        display: block;
        position: static;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

    .navbar-nav {
        display: flex;
        gap: var(--space-2);
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .nav-link {
        padding: var(--space-2) var(--space-4);
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        border-radius: var(--radius-md);
        transition: background var(--transition-fast), color var(--transition-fast);
    }

    .nav-link:hover,
    .nav-link:focus {
        background: rgba(255, 255, 255, 0.15);
        color: white;
    }
}

.navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: var(--space-3);
    color: white;
    text-decoration: none;
    font-weight: 500;
}

@media (min-width: 768px) {
    .nav-link {
        display: inline-block;
    }
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
    color: white;
    padding: var(--space-16) 0 var(--space-12);
    margin-bottom: var(--space-8);
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='7' cy='7' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

.hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin: 0 0 var(--space-4);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    margin: 0;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-faq-link {
    margin: var(--space-4) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.hero-faq-link a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: var(--font-size-sm);
}

.hero-faq-link a:hover {
    color: white;
}

.hero-sep {
    color: rgba(255, 255, 255, 0.5);
}

.hero-share-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition-fast);
}

.hero-share-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.hero-share-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
}

/* ==================== SECTIONS ==================== */
.section {
    padding: var(--space-12) 0;
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--secondary-900);
    margin: 0 0 var(--space-2);
    text-align: center;
}

.section-subtitle {
    font-size: var(--font-size-base);
    color: var(--secondary-600);
    margin: 0 0 var(--space-8);
    text-align: center;
}

/* ==================== SYSTEM CARDS ==================== */
.system-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-top: var(--space-6);
}

@media (min-width: 640px) {
    .system-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .system-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.system-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--secondary-200);
    padding: var(--space-6);
    transition: all var(--transition-base);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (prefers-reduced-motion: no-preference) {
    .system-card {
        opacity: 0;
        transform: translateY(20px);
        animation: cardFadeIn 0.5s ease-out forwards;
    }
    .system-card:nth-child(1) { animation-delay: 0.1s; }
    .system-card:nth-child(2) { animation-delay: 0.2s; }
    .system-card:nth-child(3) { animation-delay: 0.3s; }
}

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.system-card:focus-within {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.system-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
}

.system-card-cvghr .system-card-icon {
    background: var(--primary-100);
    color: var(--cvghr-accent);
}

.system-card-inventox .system-card-icon {
    background: #dcfce7;
    color: var(--inventox-accent);
}

.system-card-taska .system-card-icon {
    background: #ede9fe;
    color: var(--taska-accent);
}

.system-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--secondary-900);
    margin: 0 0 var(--space-2);
}

.system-card p {
    font-size: var(--font-size-sm);
    color: var(--secondary-600);
    margin: 0 0 var(--space-6);
    flex-grow: 1;
    line-height: 1.5;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-base);
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-700);
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-disabled {
    background: var(--secondary-300);
    color: var(--secondary-600);
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================== SOLUTIONS SECTION ==================== */
.solutions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-top: var(--space-6);
}

@media (min-width: 640px) {
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .solutions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.solution-card {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--secondary-200);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
}

@media (prefers-reduced-motion: no-preference) {
    .solution-card {
        opacity: 0;
        transform: translateY(20px);
        animation: cardFadeIn 0.5s ease-out forwards;
    }
    .solution-card:nth-child(1) { animation-delay: 0.1s; }
    .solution-card:nth-child(2) { animation-delay: 0.2s; }
    .solution-card:nth-child(3) { animation-delay: 0.3s; }
}

.solution-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-200);
}

.solution-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-4);
}

.solution-card-cvghr {
    background: var(--primary-100);
    color: var(--cvghr-accent);
}

.solution-card-inventox {
    background: #dcfce7;
    color: var(--inventox-accent);
}

.solution-card-taska {
    background: #ede9fe;
    color: var(--taska-accent);
}

.solution-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--secondary-900);
    margin: 0 0 var(--space-2);
}

.solution-card p {
    font-size: var(--font-size-sm);
    color: var(--secondary-600);
    margin: 0 0 var(--space-4);
    line-height: 1.5;
}

.solution-badge {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 500;
    padding: var(--space-1) var(--space-3);
    background: var(--secondary-100);
    color: var(--secondary-600);
    border-radius: var(--radius-full);
}

.solutions-cta {
    text-align: center;
    margin-top: var(--space-10);
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--primary-100);
}

.solutions-cta p {
    margin: 0 0 var(--space-4);
    font-size: var(--font-size-lg);
    color: var(--secondary-700);
}

.solutions-cta .btn {
    gap: var(--space-2);
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--secondary-800);
    color: var(--secondary-300);
    padding: var(--space-6);
    margin-top: var(--space-12);
    /* Espaço à direita para o botão "voltar ao topo" não sobrepor os links */
    padding-right: calc(var(--space-6) + 44px + var(--space-4));
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: var(--font-size-sm);
}

.footer-links {
    margin: var(--space-2) 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.footer-sep {
    color: var(--secondary-500);
    user-select: none;
}

.footer-links a {
    color: var(--primary-300);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--primary-200);
    text-decoration: underline;
}

.footer-version {
    font-size: var(--font-size-xs);
    color: var(--secondary-500);
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .system-card,
    .btn,
    .nav-link,
    .back-to-top {
        transition: none;
    }

    .system-card:hover {
        transform: none;
    }
}

/* ==================== BACK TO TOP ==================== */
.back-to-top {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-600);
    color: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
    background: var(--primary-700);
    color: white;
}

/* Focus visible para teclado */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Skip link (opcional, para acessibilidade) */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--primary-600);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    z-index: 1001;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}
