/* =============================================
   VIBESCRIPT — Modern Redesign
   Font: Syne (headings) + DM Sans (body)
   Themes: Dark (default) · Light
   ============================================= */

/* ── Dark theme (default) ─────────────── */
:root {
    --bg:        #04060f;
    --surface:   #080d1e;
    --card:      #0b1126;
    --border:    rgba(255,255,255,.07);
    --border-h:  rgba(255,255,255,.14);
    --text:      #dce6f5;
    --muted:     #6b82a8;
    --primary:   #2a5fff;
    --primary-l: #4f7fff;
    --accent:    #00c98d;
    --glow-p:    rgba(42,95,255,.18);
    --glow-a:    rgba(0,201,141,.14);
    --header-bg: rgba(4,6,15,.75);
    --input-bg:  rgba(255,255,255,.03);
    --shadow:    0 16px 40px rgba(0,0,0,.4);
    --radius:    16px;
    --radius-sm: 10px;
    color-scheme: dark;
}

/* ── Light theme ──────────────────────── */
[data-theme="light"] {
    --bg:        #f0f4ff;
    --surface:   #e8edf8;
    --card:      #ffffff;
    --border:    rgba(0,0,0,.08);
    --border-h:  rgba(0,0,0,.15);
    --text:      #0f1a35;
    --muted:     #5a6e94;
    --primary:   #1e4de0;
    --primary-l: #2a5fff;
    --accent:    #00a872;
    --glow-p:    rgba(42,95,255,.12);
    --glow-a:    rgba(0,168,114,.1);
    --header-bg: rgba(240,244,255,.85);
    --input-bg:  rgba(0,0,0,.03);
    --shadow:    0 8px 32px rgba(0,0,0,.10);
    color-scheme: light;
}

/* ── Reset ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    transition: background .35s ease, color .35s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Noise texture ──────────────────── */
.noise {
    pointer-events: none; position: fixed; inset: 0; z-index: 999;
    opacity: .018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
}
[data-theme="light"] .noise { opacity: .008; }

/* ── Cursor glow ─────────────────────── */
.cursor-glow {
    pointer-events: none; position: fixed; z-index: 0;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(42,95,255,.07) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: left .12s ease, top .12s ease;
    will-change: left, top;
}

/* ── Layout ──────────────────────────── */
.container { width: min(1160px, 92vw); margin-inline: auto; }

/* ── Typography ──────────────────────── */
h1, h2, h3 { font-family: 'Syne', sans-serif; }
.gradient-text {
    background: linear-gradient(110deg, var(--primary-l) 0%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-label {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .78rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; color: var(--primary-l);
    margin-bottom: .8rem;
}
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: .6rem; line-height: 1.15; }
.section-sub { color: var(--muted); margin-bottom: 2.8rem; }
.amp { color: var(--muted); font-weight: 400; }

/* ── Buttons ──────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: 'DM Sans', sans-serif; font-weight: 500;
    font-size: .95rem; border: none; border-radius: var(--radius-sm);
    padding: .85rem 1.6rem; transition: all .25s ease;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1e4bd8 100%);
    color: white; box-shadow: 0 4px 24px var(--glow-p);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(42,95,255,.45);
    background: linear-gradient(135deg, var(--primary-l) 0%, var(--primary) 100%);
}
.btn-ghost {
    background: transparent; color: var(--text);
    border: 1px solid var(--border-h);
}
.btn-ghost:hover {
    background: rgba(128,128,128,.08);
    border-color: var(--border-h);
    transform: translateY(-2px);
}

/* ── Header ──────────────────────────── */
header {
    position: sticky; top: 0; z-index: 100;
    background: var(--header-bg);
    backdrop-filter: saturate(160%) blur(20px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .3s, background .35s;
}
header.scrolled { box-shadow: 0 4px 40px rgba(0,0,0,.15); }
.nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: .9rem 0;
}
.nav > .lang-toggle { justify-self: center; }
.brand {
    display: flex; align-items: center; gap: .7rem;
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: 1.15rem; letter-spacing: -.01em;
}
.brand-name { color: var(--text); }
.logo-mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #0a1f60, #0e2a50);
    display: grid; place-items: center;
    border: 1px solid rgba(42,95,255,.35);
    box-shadow: 0 0 16px rgba(42,95,255,.25);
}
nav ul { display: flex; align-items: center; gap: .4rem; list-style: none; }
nav { display: flex; align-items: center; gap: .5rem; justify-self: end; }
nav a {
    padding: .45rem .9rem; border-radius: 8px;
    color: var(--muted); font-weight: 500; font-size: .9rem;
    transition: all .2s;
}
nav a:hover { color: var(--text); background: rgba(128,128,128,.08); }
.nav-cta {
    background: rgba(42,95,255,.12) !important;
    color: var(--primary-l) !important;
    border: 1px solid rgba(42,95,255,.25);
}
.nav-cta:hover { background: rgba(42,95,255,.2) !important; color: var(--primary) !important; }

/* ── Header right controls ─────────────── */
.header-controls {
    display: flex; align-items: center; gap: .5rem;
}
.mobile-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: rgba(128,128,128,.08); border: 1px solid var(--border-h);
    border-radius: 10px; padding: .6rem .7rem;
}
.mobile-toggle span {
    display: block; width: 20px; height: 1.5px;
    background: var(--text); border-radius: 2px;
    transition: all .3s;
}
.mobile-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px,-4.5px); }

/* ── Language toggle ─────────────── */
.lang-toggle {
    display: flex; align-items: center;
    background: rgba(128,128,128,.07);
    border: 1px solid var(--border);
    border-radius: 8px; padding: 2px; gap: 1px;
    transition: background .35s, border-color .35s;
}
.lang-btn {
    background: transparent; border: none;
    color: var(--muted); font-family: 'Syne', sans-serif;
    font-size: .7rem; font-weight: 700; letter-spacing: .08em;
    padding: .22rem .52rem; border-radius: 6px;
    transition: all .2s; cursor: pointer; line-height: 1;
}
.lang-btn:hover { color: var(--text); background: rgba(128,128,128,.08); }
.lang-btn.active {
    background: var(--primary); color: white;
    box-shadow: 0 1px 6px rgba(42,95,255,.45);
}

/* ── Theme toggle button ──────────────── */
.theme-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: rgba(128,128,128,.07);
    border: 1px solid var(--border);
    border-radius: 8px; color: var(--muted);
    transition: all .2s; flex-shrink: 0;
}
.theme-btn:hover { color: var(--text); background: rgba(128,128,128,.12); border-color: var(--border-h); }
.theme-btn .icon-sun  { display: none; }
.theme-btn .icon-moon { display: block; }
[data-theme="light"] .theme-btn .icon-sun  { display: block; }
[data-theme="light"] .theme-btn .icon-moon { display: none; }

/* ── Hero ──────────────────────────── */
.hero {
    position: relative; min-height: 92vh;
    display: flex; align-items: center;
    padding: 6rem 0 5rem; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; }
.orb-1 {
    width: 700px; height: 700px; top: -200px; left: -150px;
    background: radial-gradient(circle, rgba(42,95,255,.3), transparent 70%);
}
.orb-2 {
    width: 500px; height: 500px; top: -100px; right: -100px;
    background: radial-gradient(circle, rgba(0,201,141,.2), transparent 70%);
}
.orb-3 {
    width: 400px; height: 400px; bottom: -100px; left: 35%;
    background: radial-gradient(circle, rgba(42,95,255,.15), transparent 70%);
}
[data-theme="light"] .orb { opacity: .2; }
.grid-lines {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero-tag {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(42,95,255,.08); border: 1px solid rgba(42,95,255,.2);
    color: var(--primary-l); border-radius: 100px;
    padding: .35rem .9rem; font-size: .82rem; font-weight: 500;
    margin-bottom: 1.4rem;
}
.dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 8px var(--accent);
    animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
    50% { opacity: .6; box-shadow: 0 0 16px var(--accent); }
}
.hero-title { font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 1.3rem; }
.hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 560px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3.5rem; }
.hero-stats {
    display: flex; align-items: center; gap: 1.5rem;
    padding: 1.2rem 1.6rem;
    background: rgba(128,128,128,.04);
    border: 1px solid var(--border);
    border-radius: var(--radius); width: fit-content;
    backdrop-filter: blur(8px);
}
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat strong { font-family: 'Syne', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.stat span { font-size: .78rem; color: var(--muted); }
.stat-div { width: 1px; height: 36px; background: var(--border-h); }
.scroll-indicator {
    position: absolute; bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center;
}
.scroll-line {
    width: 1px; height: 48px;
    background: linear-gradient(to bottom, transparent, var(--primary-l), transparent);
    animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    51%  { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Reveal animations ─────────────── */
.reveal-up {
    opacity: 0; transform: translateY(28px);
    transition: opacity .65s ease var(--d, 0s), transform .65s ease var(--d, 0s);
}
.reveal-up.visible { opacity: 1; transform: none; }

/* ── Sobre ──────────────────────────── */
.section-sobre { padding: 6rem 0; }
.sobre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.sobre-text h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1rem; }
.sobre-text p { color: var(--muted); margin-bottom: 1.6rem; font-size: 1.02rem; }
.tags-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.tag {
    background: rgba(128,128,128,.06);
    border: 1px solid var(--border-h);
    border-radius: 100px; padding: .35rem .9rem;
    font-size: .82rem; color: var(--muted); transition: all .2s;
}
.tag:hover { border-color: rgba(42,95,255,.4); color: var(--primary-l); }
.sobre-visual { display: flex; justify-content: center; }
.visual-card {
    position: relative; width: 280px; height: 280px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1rem;
}
.vc-ring {
    position: absolute; border-radius: 50%;
    border: 1px solid rgba(42,95,255,.12);
    animation: ringPulse 4s ease-in-out infinite;
}
.vc-ring-1 { width: 100%; height: 100%; }
.vc-ring-2 { width: 75%; height: 75%; border-color: rgba(42,95,255,.2); animation-delay: .6s; }
.vc-ring-3 { width: 50%; height: 50%; border-color: rgba(0,201,141,.2); animation-delay: 1.2s; }
@keyframes ringPulse {
    0%, 100% { opacity: .5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}
.vc-check { position: relative; z-index: 1; }
.vc-label {
    font-family: 'Syne', sans-serif; font-size: .85rem; font-weight: 600;
    text-align: center; color: var(--muted); line-height: 1.5;
    position: relative; z-index: 1;
}

/* ── Visão & Missão ─────────────────── */
.section-vm { padding: 5rem 0; }
.section-vm .section-label, .section-vm .section-title { display: block; text-align: center; }
.section-vm .section-title { margin-bottom: 2.5rem; }
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.vm-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem;
    transition: all .3s ease; position: relative; overflow: hidden;
}
.vm-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--glow-p), transparent 60%);
    opacity: 0; transition: opacity .3s;
}
.vm-card:hover::before { opacity: 1; }
.vm-card:hover { border-color: var(--border-h); transform: translateY(-4px); }
.vm-icon { font-size: 2rem; margin-bottom: .8rem; }
.vm-tag {
    display: inline-block;
    background: rgba(42,95,255,.1); border: 1px solid rgba(42,95,255,.2);
    color: var(--primary-l); border-radius: 6px;
    padding: .2rem .7rem; font-size: .75rem; font-weight: 600;
    letter-spacing: .05em; text-transform: uppercase; margin-bottom: .8rem;
}
.vm-card h3 { font-size: 1.2rem; margin-bottom: .7rem; }
.vm-card p { color: var(--muted); font-size: .95rem; }

/* ── Serviços ──────────────────────── */
.section-servicos { padding: 5rem 0; }
.section-servicos .section-label, .section-servicos .section-title { display: block; text-align: center; }
.section-servicos .section-title { margin-bottom: 2.5rem; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.service-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.8rem;
    transition: all .3s ease; position: relative; overflow: hidden;
}
.service-card::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 2px; background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0); transition: transform .35s ease; transform-origin: left;
}
.service-card:hover { border-color: var(--border-h); transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card:hover::after { transform: scaleX(1); }
.sc-icon { font-size: 1.8rem; margin-bottom: .8rem; }
.service-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.service-card p { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.sc-line { display: none; }

/* ── Portfólio ─────────────────────── */
.section-portfolio { padding: 5rem 0; }
.section-portfolio .section-label, .section-portfolio .section-title, .section-portfolio .section-sub { display: block; text-align: center; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.portfolio-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: all .35s ease;
}
.portfolio-card:hover { border-color: var(--border-h); transform: translateY(-6px); box-shadow: var(--shadow); }
.pc-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.portfolio-card:hover .pc-thumb img { transform: scale(1.06); }
.pc-overlay {
    position: absolute; inset: 0;
    background: rgba(4,6,15,.6);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .3s; backdrop-filter: blur(2px);
}
.pc-thumb:hover .pc-overlay { opacity: 1; }
.pc-content { padding: 1.4rem; }
.pc-tag {
    display: inline-block; font-size: .72rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
    margin-bottom: .5rem;
}
.pc-content h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.pc-content p { color: var(--muted); font-size: .875rem; margin-bottom: 1rem; }
.pc-link {
    display: inline-flex; align-items: center; gap: .4rem;
    color: var(--primary-l); font-size: .85rem; font-weight: 500;
    transition: gap .2s;
}
.pc-link:hover { gap: .7rem; }

/* ── Contato ──────────────────────── */
.section-contato { padding: 5rem 0; }
.section-contato .section-label, .section-contato .section-title, .section-contato .section-sub { display: block; text-align: center; }
.contato-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.contato-form { display: flex; flex-direction: column; gap: 0; }
.field-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.2rem; }
.field-group label { font-size: .85rem; font-weight: 500; color: var(--muted); }
.input {
    background: var(--input-bg); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm);
    padding: .85rem 1rem; font-family: 'DM Sans', sans-serif;
    font-size: .95rem; outline: none; width: 100%;
    transition: all .25s;
}
.input:focus { border-color: rgba(42,95,255,.5); box-shadow: 0 0 0 4px rgba(42,95,255,.1); }
textarea.input { resize: vertical; min-height: 130px; }
.form-msg { font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.info-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.8rem;
}
.info-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 0; }
.info-item:first-child { padding-top: 0; }
.info-icon { font-size: 1.4rem; margin-top: .1rem; }
.info-item div { display: flex; flex-direction: column; gap: .2rem; }
.info-item strong { font-size: .9rem; font-weight: 600; }
.info-item span, .info-item a { font-size: .9rem; color: var(--muted); }
.info-item a:hover { color: var(--primary-l); }
.info-divider { height: 1px; background: var(--border); }
.info-cta { margin-top: 1.4rem; }

/* ── Footer ──────────────────────── */
footer { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-brand {
    display: flex; align-items: center; gap: .6rem;
    font-family: 'Syne', sans-serif; font-weight: 700;
    font-size: 1rem; color: var(--text);
}
.footer-copy { font-size: .85rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .85rem; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── Lightbox ─────────────────────── */
.lb-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(4,6,15,.95);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem; opacity: 0; visibility: hidden;
    transition: all .3s ease; backdrop-filter: blur(8px);
}
.lb-overlay.open { opacity: 1; visibility: visible; }
.lb-img {
    max-width: 90%; max-height: 85vh;
    border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.7);
    transform: scale(.92); transition: transform .35s ease;
}
.lb-overlay.open .lb-img { transform: scale(1); }
.lb-close {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: rgba(255,255,255,.08); border: 1px solid var(--border-h);
    border-radius: 10px; padding: .6rem; color: var(--text); transition: all .2s;
}
.lb-close:hover { background: rgba(255,255,255,.15); }

/* ── Responsive ──────────────────── */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .sobre-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .sobre-visual { display: none; }
    .vm-grid { grid-template-columns: 1fr; }
    .contato-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    nav ul {
        display: none; flex-direction: column; align-items: stretch;
        position: absolute; top: 70px; left: 4%; right: 4%;
        background: var(--surface); border: 1px solid var(--border-h);
        border-radius: 16px; padding: 1rem;
        backdrop-filter: blur(20px); z-index: 200; gap: .2rem;
    }
    nav ul.open { display: flex; animation: menuDrop .25s ease; }
    @keyframes menuDrop {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    nav a { padding: .7rem 1rem; border-radius: 10px; }
    .mobile-toggle { display: flex; }
    nav { position: relative; }
    .hero { min-height: auto; padding: 5rem 0 4rem; }
    .hero-title { font-size: clamp(2rem, 6vw, 2.8rem); }
    .hero-stats { width: 100%; justify-content: center; }
    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .hero-stats { flex-direction: column; gap: .8rem; }
    .stat-div { width: 80%; height: 1px; }
}
