/* ============================================================
   BINARY EYE CORPORATION — Main Stylesheet
   Stack: Pure CSS Variables + Vanilla JS
   ============================================================ */

/* === BRAND PRIMÁRIA === */
:root {
    --cyan-core:    #00D4E8;
    --cyan-bright:  #00EEFF;
    --cyan-muted:   #00A8BE;
    --cyan-deep:    #007A8C;

    /* === DARK MODE (default) === */
    --dark-bg:        #0D1117;
    --dark-surface:   #161C26;
    --dark-card:      #1E2733;
    --dark-border:    #263040;

    /* === LIGHT MODE === */
    --light-bg:       #F0F6FA;
    --light-surface:  #FFFFFF;
    --light-card:     #E4EEF5;
    --light-border:   #C8DCE8;

    /* === GRADIENTES === */
    --gradient-brand:      linear-gradient(135deg, #00D4E8 0%, #00A8BE 100%);
    --gradient-dark-hero:  linear-gradient(180deg, #0D1117 0%, #161C26 100%);
    --gradient-light-hero: linear-gradient(180deg, #F0F6FA 0%, #E4EEF5 100%);
    --gradient-glow:       radial-gradient(ellipse at 50% 50%, rgba(0,212,232,0.15) 0%, transparent 60%);

    /* === GLOW === */
    --shadow-glow:        0 0 20px rgba(0, 212, 232, 0.25);
    --shadow-glow-strong: 0 0 30px rgba(0, 212, 232, 0.35);

    /* === TIPOGRAFIA === */
    --font-display: 'Poppins', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --text-hero: clamp(36px, 5vw, 64px);
    --text-h1:   clamp(28px, 3.5vw, 48px);
    --text-h2:   clamp(22px, 2.5vw, 36px);
    --text-h3:   clamp(18px, 2vw, 22px);
    --text-body: 16px;
    --text-small: 14px;
    --text-mono:  13px;
}

/* === THEME APPLICATION === */
[data-theme="dark"] {
    --bg: var(--dark-bg);
    --surface: var(--dark-surface);
    --card: var(--dark-card);
    --border: var(--dark-border);
    --text: #E4EEF5;
    --text-muted: #8B9DB5;
    --accent: var(--cyan-bright);
    --accent-hover: var(--cyan-core);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg: var(--light-bg);
    --surface: var(--light-surface);
    --card: var(--light-card);
    --border: var(--light-border);
    --text: #1A2B3C;
    --text-muted: #5A6B7C;
    --accent: var(--cyan-muted);
    --accent-hover: var(--cyan-deep);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* === LAYOUT === */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 48px 0;
    }
    .container {
        padding: 0 16px;
    }
}

/* === NAVBAR === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(240, 246, 250, 0.95);
}

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

.navbar-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-text {
    color: var(--text);
}

.logo-accent {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 212, 232, 0.5);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    position: relative;
}

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

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.btn-cta {
    padding: 10px 24px;
    background: #00D4E8;
    color: #0D1117;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-cta:hover {
    transform: translateY(-2px);
    background: #00A8BE;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 16px;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-link:hover {
    background: var(--surface);
    color: var(--accent);
}

@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }
    .mobile-toggle {
        display: flex;
    }
    .btn-cta {
        display: none;
    }
}

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-dark-hero);
    position: relative;
    overflow: hidden;
    padding-top: 72px;
}

[data-theme="light"] .hero {
    background: var(--gradient-light-hero);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-inner {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    position: relative;
}

.hero-svg {
    width: 100%;
    height: 100%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .hero-visual-inner {
        max-width: 350px;
    }
}

/* === MINI HERO === */
.mini-hero {
    padding: 100px 0 60px;
    background: var(--gradient-dark-hero);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .mini-hero {
    background: var(--gradient-light-hero);
}

.mini-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    pointer-events: none;
}

.mini-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.mini-hero-title {
    font-size: var(--text-h1);
    margin-bottom: 16px;
    color: var(--text);
}

.mini-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .mini-hero {
        padding: 80px 0 40px;
    }

    .mini-hero-title {
        font-size: var(--text-h2);
    }

    .mini-hero-subtitle {
        font-size: 1rem;
    }
}

.hero-title {
    font-size: var(--text-hero);
    margin-bottom: 24px;
    color: var(--text);
}

.hero-title .highlight {
    color: var(--accent);
    text-shadow: 0 0 30px rgba(0, 212, 232, 0.6);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 14px 32px;
    background: #00D4E8;
    color: #0D1117;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #00A8BE;
}

.btn-secondary {
    padding: 14px 32px;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(0, 212, 232, 0.1);
}

/* === STATS BAR === */
.stats-bar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 32px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

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

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 212, 232, 0.4);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === CARDS === */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text);
}

.card-desc {
    color: var(--text-muted);
    line-height: 1.6;
}

/* === GRID === */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

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

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

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* === SECTION HEADER === */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-eyebrow {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 212, 232, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-title {
    font-size: var(--text-h2);
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* === FOOTER === */
.footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--border);
    padding: 64px 0 24px;
}

[data-theme="light"] .footer {
    background: var(--light-surface);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1.3fr 1.2fr;
    gap: 32px;
    margin-bottom: 48px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.footer-desc {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.footer-link {
    display: block;
    padding: 8px 0;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: var(--accent);
    padding-left: 8px;
}

.footer-contact {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.9rem;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-legal {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-legal span {
    color: var(--text-muted);
}

.footer-credit {
    text-align: right;
}

.footer-credit a {
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .footer-credit {
        text-align: center;
    }
}

/* === ANIMATIONS === */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === FORM === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 232, 0.1);
}

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

/* === ACCORDION === */
.accordion {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: 20px 24px;
    background: var(--card);
    border: none;
    text-align: left;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.accordion-header:hover {
    background: var(--surface);
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content p {
    padding: 0 24px 24px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* === FILTER BUTTONS === */
.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 212, 232, 0.1);
}

/* === TESTIMONIALS === */
.testimonials-slider {
    position: relative;
    overflow: hidden;
}

.testimonials-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-card {
    min-width: 100%;
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
}

.testimonial-text {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    font-weight: 600;
    color: var(--accent);
}

.testimonial-company {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === ERROR MESSAGES === */
.error-message {
    padding: 12px 16px;
    background: rgba(194, 59, 34, 0.1);
    border: 1px solid rgba(194, 59, 34, 0.3);
    border-radius: 8px;
    color: #c23b22;
    margin-bottom: 16px;
}

.success-message {
    padding: 12px 16px;
    background: rgba(26, 122, 74, 0.1);
    border: 1px solid rgba(26, 122, 74, 0.3);
    border-radius: 8px;
    color: #1a7a4a;
    margin-bottom: 16px;
}