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

:root {
    --bg-void: #080810;
    --bg-surface: #0e0e18;
    --bg-card: #12121e;
    --cyan: #00e5ff;
    --cyan-dim: rgba(0, 229, 255, 0.12);
    --cyan-glow: rgba(0, 229, 255, 0.06);
    --text-primary: #f0f0f8;
    --text-muted: #60607a;
    --text-secondary: #9090aa;
    --border-subtle: rgba(255, 255, 255, 0.045);
    --border-cyan: rgba(0, 229, 255, 0.25);
    --radius-card: 16px;
    --radius-sm: 6px;
    --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-void);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ─── NOISE GRAIN OVERLAY ───────────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.028;
    pointer-events: none;
    z-index: 9999;
}

/* ─── CUSTOM CURSOR ─────────────────────────────────────────────── */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-ring {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 229, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--transition-smooth), height 0.4s var(--transition-smooth), border-color 0.4s ease;
}

body.cursor-hover .cursor  { width: 16px; height: 16px; opacity: 0.7; }
body.cursor-hover .cursor-ring { width: 60px; height: 60px; border-color: var(--cyan); }

/* ─── CONTAINER ─────────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ─── HEADER ────────────────────────────────────────────────────── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 22px 0;
    transition: background 0.5s ease, border-color 0.5s ease, padding 0.4s ease;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(8, 8, 16, 0.85);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom-color: var(--border-subtle);
    padding: 16px 0;
}

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 52px;
    transition: opacity 0.3s ease;
    filter: brightness(1) drop-shadow(0 0 8px rgba(0, 229, 255, 0.2));
}

.logo:hover { opacity: 0.85; }

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 36px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cyan);
    transition: width 0.35s var(--transition-smooth);
}

nav a:hover { color: var(--text-primary); }
nav a:hover::after { width: 100%; }

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border: 1px solid var(--border-cyan);
    border-radius: var(--radius-sm);
    color: var(--cyan) !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.08em;
    transition: background 0.3s ease, box-shadow 0.3s ease !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
    background: var(--cyan-dim);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
    color: var(--cyan) !important;
}

/* ─── HERO ──────────────────────────────────────────────────────── */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-ambient::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(ellipse at center,
        rgba(0, 229, 255, 0.065) 0%,
        rgba(0, 80, 120, 0.03) 45%,
        transparent 70%);
    border-radius: 50%;
}

.hero-ambient::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(ellipse at center,
        rgba(80, 0, 200, 0.04) 0%,
        transparent 70%);
    border-radius: 50%;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 32px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--cyan);
    opacity: 0.5;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.hero h1 .word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.hero h1 .word-inner {
    display: inline-block;
    transform: translateY(110%);
    filter: blur(12px);
    opacity: 0;
}

.hero h1 .cyan-text { color: var(--cyan); }

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 52px;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(24px);
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(24px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--cyan), transparent);
    animation: scroll-pulse 2.2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50%       { opacity: 1;   transform: scaleY(1.1); }
}

/* ─── BUTTONS ───────────────────────────────────────────────────── */
.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 36px;
    background: var(--cyan);
    color: var(--bg-void);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.15s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.45), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover::before { opacity: 1; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--border-cyan);
    color: var(--text-primary);
    background: var(--cyan-glow);
}

/* ─── SECTION SHARED ────────────────────────────────────────────── */
.section { padding: 120px 0; }

.section-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--cyan);
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    font-weight: 300;
    line-height: 1.7;
}

/* ─── STATS ─────────────────────────────────────────────────────── */
.stats-section {
    padding: 80px 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

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

.stat-item {
    text-align: center;
    padding: 24px 20px;
    border-right: 1px solid var(--border-subtle);
    opacity: 0;
    transform: translateY(20px);
}

.stat-item:last-child { border-right: none; }

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-number span { color: var(--cyan); }

.stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ─── VIDEO GALLERY ─────────────────────────────────────────────── */
.gallery-section {
    background: var(--bg-void);
    padding: 120px 0;
}

.gallery-header {
    margin-bottom: 64px;
    text-align: center;
}

.gallery-header .section-label {
    justify-content: center;
}

.gallery-header .section-label::before { display: none; }

/* ── Video grid: all 3 cards always equal width ───────────────── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    position: relative;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
    opacity: 0;
    transform: translateY(40px);
}

.video-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-card);
    background: radial-gradient(
        circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(0, 229, 255, 0.1) 0%,
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

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

.video-card:hover {
    border-color: rgba(0, 229, 255, 0.28);
    box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.1),
                0 24px 48px rgba(0, 0, 0, 0.6);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-meta { padding: 22px 24px; }

.video-tag {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 8px;
}

.video-meta h3 {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

/* ─── PORTFOLIO ─────────────────────────────────────────────────── */
.portfolio-section {
    background: var(--bg-surface);
    padding: 120px 0;
    position: relative;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 56px;
}

.portfolio-header .section-subtitle { text-align: right; }

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

.portfolio-card {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
    will-change: transform;
}

.portfolio-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-card);
    background: radial-gradient(
        circle 180px at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(0, 229, 255, 0.12) 0%,
        transparent 75%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 3;
}

.portfolio-card:hover::after { opacity: 1; }

.portfolio-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: transform 0.7s var(--transition-smooth), filter 0.5s ease;
    filter: brightness(0.9) saturate(0.85);
}

.portfolio-card:hover img {
    transform: scale(1.06);
    filter: brightness(1) saturate(1.05);
}

.portfolio-info {
    padding: 20px 22px 22px;
    position: relative;
    z-index: 4;
}

.portfolio-index {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.portfolio-info h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.portfolio-info p {
    font-size: 0.8rem;
    color: var(--cyan);
    font-weight: 400;
    letter-spacing: 0.04em;
}

.portfolio-hover-line {
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--cyan), rgba(0, 229, 255, 0.3));
    transition: width 0.5s var(--transition-smooth);
}

.portfolio-card:hover .portfolio-hover-line { width: 100%; }

/* ─── ESPECIALIDADES ────────────────────────────────────────────── */
.services-section {
    padding: 120px 0;
    background: var(--bg-void);
}

.services-header {
    text-align: center;
    margin-bottom: 72px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: var(--border-subtle);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.service-card {
    background: var(--bg-card);
    padding: 44px 48px;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
    opacity: 0;
    transform: translateY(24px);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle 220px at var(--mouse-x, -100%) var(--mouse-y, -100%),
        rgba(0, 229, 255, 0.07) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.service-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--cyan-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--cyan);
    font-size: 1.1rem;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
    font-weight: 300;
}

.service-number {
    position: absolute;
    top: 40px; right: 44px;
    font-size: 5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.02);
    letter-spacing: -0.04em;
    line-height: 1;
    user-select: none;
}

/* ─── CONTACT ───────────────────────────────────────────────────── */
.contact-section {
    padding: 140px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-bg-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.contact-section .section-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    max-width: 700px;
    margin: 0 auto 20px;
}

.contact-section .section-subtitle {
    max-width: 460px;
    margin: 0 auto 52px;
    text-align: center;
}

.contact-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 48px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 12px 20px;
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.contact-link:hover {
    color: var(--cyan);
    border-color: var(--border-cyan);
    background: var(--cyan-glow);
}

/* ─── FOOTER ────────────────────────────────────────────────────── */
footer {
    padding: 36px 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.footer-logo {
    height: 36px;
    opacity: 0.5;
    filter: brightness(10);
}

/* ─── RESPONSIVO ────────────────────────────────────────────────── */

/* Tablet: 2 colunas para vídeos e portfólio */
@media (max-width: 1024px) {
    /* Os 3 vídeos ficam em 2 colunas — o 3º centralizado sem stretching */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Centraliza o 3º card na linha de baixo sem ocupar largura diferente */
    .video-grid .video-card:last-child {
        grid-column: 1 / 2; /* ocupa só a 1ª coluna — mesma largura */
        justify-self: center;
        width: 100%;
    }

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

    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .portfolio-header .section-subtitle { text-align: left; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
}

/* Mobile: tudo em 1 coluna */
@media (max-width: 768px) {
    .container { padding: 0 20px; }

    nav ul { display: none; }

    .hero h1 { font-size: 2.4rem; }
    .hero-actions { flex-direction: column; gap: 12px; }

    /* 1 coluna — todos os 3 vídeos com largura idêntica, sem override */
    .video-grid {
        grid-template-columns: 1fr;
    }

    .video-grid .video-card:last-child {
        grid-column: auto;
        justify-self: auto;
        width: auto;
    }

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

    .cursor, .cursor-ring { display: none; }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
