/* ===================================
   OMS DESENVOLVIMENTO - PREMIUM
   Dark | Refined | Sophisticated
   Inspired by KraftPanel aesthetic
   =================================== */

:root {
    /* Core palette — KraftPanel inspired */
    --bg: #0a0a0f;
    --bg-elevated: #111118;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    --text: #e2e2e8;
    --text-secondary: #9898a6;
    --text-muted: #4a4a5a;

    --accent: #003d71;
    --accent-subtle: rgba(0, 61, 113, 0.18);
    --accent-hover: #0a5ba1;

    /* Layout */
    --container: 1200px;
    --header-h: 92px;
    --section-py: 100px;
    --section-py-sm: 64px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   RESET & BASE
   =================================== */

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ambient glow — single subtle indigo, like KraftPanel */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 61, 113, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

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

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

a, p, span, h1, h2, h3, h4, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 200;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

h4 {
    font-weight: 500;
    color: var(--text);
}

p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   LAYOUT
   =================================== */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: var(--section-py) 0;
    position: relative;
}

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

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background 0.3s var(--ease);
}

.header.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.2);
}

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

/* Logo */
.logo a {
    display: flex;
    align-items: center;
}

.logo-img {
    display: block;
    height: 70px;
    width: auto;
    transition: opacity 0.2s var(--ease);
}

.logo-img:hover {
    opacity: 0.8;
}

.logo-text {
    display: none;
}

/* Nav */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
    padding: 0.3rem 0;
    transition: color 0.2s var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    display: none;
}

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

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

/* ===================================
   BUTTONS
   =================================== */

.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border: none;
    text-align: center;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(226, 226, 232, 0.15);
}

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

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* ===================================
   CARDS
   =================================== */

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.glass-card > *,
.glass-card form,
.glass-card a,
.glass-card button,
.glass-card input,
.glass-card select,
.glass-card textarea {
    position: relative;
    z-index: 5;
}

.glass-card::before {
    display: none;
}

.glass-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

/* Service cards */
.service-card {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-2px);
}

.service-card h3 {
    color: var(--text);
}

.service-card p {
    color: var(--text-secondary);
}

.service-card span {
    transition: color 0.2s var(--ease);
}

.service-card:hover span {
    color: var(--text-secondary);
}

/* ===================================
   HERO
   =================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-h);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    max-width: 540px;
    color: var(--text-secondary);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    border-radius: 16px;
    filter: brightness(0.65) saturate(0.75);
}

/* Hero meta strip (Performance / Exclusividade / Escalabilidade) */
.hero-meta {
    margin-top: 4rem;
    display: flex;
    gap: 3.5rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    flex-wrap: wrap;
}

.hero-meta-item {
    min-width: 0;
}

.hero-meta-title {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.hero-meta-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===================================
   STATS
   =================================== */

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

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

.stat-number {
    font-size: 3rem;
    font-weight: 200;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 0.5rem;
}

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

/* ===================================
   SERVICES GRID
   =================================== */

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

/* ===================================
   CLIENTS CAROUSEL
   =================================== */

.clients-carousel {
    overflow: hidden;
    padding: 1rem 0;
    position: relative;
    width: 100%;
}

.clients-track {
    display: flex;
    gap: 5rem;
    animation: scroll-clients 40s linear infinite;
    width: fit-content;
    align-items: center;
}

.clients-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-clients {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.client-item {
    flex-shrink: 0;
    width: 130px;
    transition: transform 0.3s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-item:hover {
    transform: scale(1.06);
}

.client-item img {
    max-width: 100%;
    max-height: 45px;
    object-fit: contain;
}

/* ===================================
   TWO COLUMN LAYOUT
   =================================== */

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

/* ===================================
   FORMS
   =================================== */

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%234a4a5a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
}

.form-select option {
    background: var(--bg);
    color: var(--text);
}

/* ===================================
   FAQ / DETAILS
   =================================== */

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.faq-item.glass-card {
    padding: 1.5rem 1.75rem;
    cursor: pointer;
}

.faq-item > summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    color: var(--text);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.4;
}

.faq-item > summary::-webkit-details-marker,
.faq-item > summary::marker {
    display: none;
    content: '';
}

.faq-item > summary span {
    flex: 1;
    min-width: 0;
}

.faq-item > summary i {
    flex-shrink: 0;
    color: var(--accent);
    font-size: 0.8rem;
    transition: transform 0.25s var(--ease);
}

.faq-item[open] > summary i {
    transform: rotate(180deg);
}

.faq-item > p {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .faq-item.glass-card {
        padding: 1.25rem 1.1rem;
    }
    .faq-item > summary {
        font-size: 0.95rem;
        gap: 1rem;
    }
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: auto;
    margin-bottom: 1.5rem;
}

.footer-logo-img {
    display: block;
    height: 80px;
    width: auto;
    margin-bottom: 1.25rem;
}

.footer-logo-text {
    display: none;
}

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

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s var(--ease);
    font-size: 0.9rem;
}

.social-link:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.footer-title {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.footer-links,
.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s var(--ease);
}

.footer-links a:hover {
    color: var(--text);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-contact a {
    color: var(--text-muted);
    transition: color 0.2s var(--ease);
}

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

.footer-contact svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

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

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-tech {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* ===================================
   ANIMATIONS
   =================================== */

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

.fade-in-up {
    animation: fadeInUp 0.5s var(--ease);
}

/* ===================================
   RESPONSIVE — TABLET (max 968px)
   =================================== */

@media (max-width: 968px) {
    :root {
        --section-py: var(--section-py-sm);
        --header-h: 80px;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .mobile-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-h);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-h));
        flex-direction: column;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 2rem 1.5rem;
        gap: 0;
        border-bottom: 1px solid var(--border);
        transition: left 0.3s var(--ease);
        margin: 0;
        overflow-y: auto;
        display: flex;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-link {
        display: block;
        padding: 1.1rem 0;
        font-size: 1.05rem;
    }

    body {
        padding-top: var(--header-h);
    }

    .hero {
        padding-top: 2.5rem !important;
        min-height: auto !important;
        padding-bottom: 3rem !important;
    }

    /* Internal hero overrides (sobre, servicos, contato) */
    .hero[style*="padding-top: 140px"] {
        padding-top: 4rem !important;
        padding-bottom: 3rem !important;
    }

    .hero-content {
        grid-template-columns: 1fr !important;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-text p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-image {
        display: none;
    }

    .hero-meta {
        margin-top: 2.5rem;
        gap: 1.5rem;
        padding-top: 1.5rem;
        justify-content: center;
        text-align: left;
    }

    .hero-meta-item {
        flex: 1 1 calc(50% - 1.5rem);
        min-width: 130px;
    }

    .logo-img {
        height: 60px;
    }

    .footer-logo-img {
        height: 80px;
    }

    /* Two column grids go single column */
    .two-col-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    /* Correct stacking order on mobile */
    .image-wrapper {
        order: 2 !important;
    }

    .hero-buttons, .footer-social {
        display: flex !important;
        width: 100%;
    }
}

/* ===================================
   RESPONSIVE — MOBILE (max 640px)
   =================================== */

@media (max-width: 640px) {
    .nav-container {
        padding: 0 1.25rem;
    }

    .logo-img {
        height: 60px;
    }

    .footer-logo-img {
        height: 80px;
    }

    .container {
        padding: 0 1.25rem;
    }

    .glass-card {
        padding: 1.75rem 1.25rem;
        border-radius: 14px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        padding: 0.95rem 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    h1 {
        font-size: 2.2rem !important;
    }

    h2 {
        font-size: 1.6rem !important;
    }

    .stat-number {
        font-size: 2.5rem;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-logo-img {
        height: 80px;
    }

    .clients-track {
        gap: 3rem;
    }

    .client-item {
        width: 100px;
    }

    .client-item img {
        max-height: 38px;
    }

    /* Stack form inline grids on small screens only */
    .form-inline-grid {
        grid-template-columns: 1fr !important;
    }

    /* Section-label spacing on small screens */
    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Generic flex/stats inside hero text - protect against overflow */
    .hero-text > div[style*="display: flex"] {
        flex-wrap: wrap;
        gap: 1.5rem !important;
    }
}

@media (max-width: 380px) {
    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .logo-img {
        height: 56px;
    }

    .hero-meta-item {
        flex: 1 1 100%;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Prevent layout shifts */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
