:root {
    --bg: #050505;
    --bg-soft: #0a0a0a;
    --red: #ff1b1b;
    --red-dark: #8d0000;
    --white: #ffffff;
    --gray: #a9a9a9;
    --muted: #5b5b5b;
    --card-bg: rgba(13, 13, 13, 0.86);
    --border: rgba(255, 255, 255, 0.09);
    --glow: rgba(255, 27, 27, 0.36);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .055;
    z-index: 2;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}
.page-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -2;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 0, 0, .13), transparent 28%),
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, .055), transparent 24%),
        linear-gradient(180deg, #050505 0%, #080202 50%, #050505 100%);
}
.page-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
}
.orb {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 0, 0, .22), transparent 66%);
    filter: blur(8px);
    animation: drift 12s ease-in-out infinite alternate;
}
.orb-one { left: -120px; top: 18%; }
.orb-two { right: -140px; top: 48%; animation-delay: -4s; }
.orb-three { width: 220px; height: 220px; left: 42%; bottom: 5%; animation-delay: -8s; opacity: .55; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(30px,-45px,0) scale(1.12); } }

.cursor-glow {
    position: fixed;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,0,0,.13), transparent 65%);
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0;
    transition: opacity .3s ease;
}

header {
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(5,5,5,0.72);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: .35s ease;
}
header.scrolled { padding: 10px 0; background: rgba(5,5,5,.93); box-shadow: 0 18px 55px rgba(0,0,0,.45); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Syncopate', sans-serif; font-size: 1.08rem; letter-spacing: 1px; position: relative; z-index: 1002; }
.logo span { color: var(--red); text-shadow: 0 0 18px var(--glow); }
.menu { display: flex; align-items: center; gap: 8px; }
.menu a {
    color: var(--white);
    text-decoration: none;
    margin-left: 12px;
    font-weight: 800;
    font-size: 0.74rem;
    text-transform: uppercase;
    transition: 0.3s;
    position: relative;
    letter-spacing: .7px;
}
.menu a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: .3s ease;
    box-shadow: 0 0 15px var(--glow);
}
.menu a:hover { color: var(--red); }
.menu a:hover::after { width: 100%; }
.nav-cta { border: 1.5px solid var(--red); padding: 10px 22px; border-radius: 50px; background: rgba(255,0,0,.08); box-shadow: inset 0 0 20px rgba(255,0,0,.08); }
.nav-cta:hover { background: var(--red); color: white; box-shadow: 0 0 30px var(--glow); }
.menu-toggle { display: none; background: transparent; border: 0; width: 42px; height: 42px; position: relative; z-index: 1002; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: white; margin: 6px auto; transition: .3s ease; }
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 90px; position: relative; }
.hero-wrapper { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 42px; align-items: center; }
.subtitle, .tag, .section-kicker { color: var(--red); letter-spacing: 5px; font-weight: 900; font-size: 0.7rem; text-transform: uppercase; text-shadow: 0 0 16px rgba(255,0,0,.25); }
.hero-text h1 { font-family: 'Syncopate', sans-serif; font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.05; margin: 20px 0; min-height: 2.15em; letter-spacing: -1px; }
.red-text { color: var(--red); text-shadow: 0 0 30px rgba(255,0,0,.35); }
.cursor { color: var(--red); animation: blink 0.7s infinite; font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }
.description { color: var(--gray); font-size: clamp(0.96rem, 2vw, 1.14rem); margin-bottom: 34px; max-width: 530px; line-height: 1.75; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn-main, .btn-ghost, .btn-submit {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn-main::before, .btn-ghost::before, .btn-submit::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.34), transparent);
    transform: translateX(-120%);
    transition: .65s ease;
    z-index: -1;
}
.btn-main:hover::before, .btn-ghost:hover::before, .btn-submit:hover::before { transform: translateX(120%); }
.btn-main { background: linear-gradient(135deg, var(--red), #9d0000); color: white; text-decoration: none; padding: 18px 38px; font-weight: 900; border-radius: 12px; display: inline-block; transition: 0.4s; font-size: 0.86rem; text-align: center; box-shadow: 0 16px 45px rgba(255,0,0,.22); }
.btn-main:hover { transform: translateY(-5px); box-shadow: 0 18px 45px rgba(255,0,0,0.44); }
.btn-ghost { color: white; text-decoration: none; padding: 17px 28px; font-weight: 900; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.035); transition: .35s ease; font-size: .82rem; }
.btn-ghost:hover { border-color: rgba(255,0,0,.55); transform: translateY(-5px); }
.hero-mini-stats { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
.hero-mini-stats div { padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.035); min-width: 105px; }
.hero-mini-stats strong { display: block; color: white; font-size: .92rem; }
.hero-mini-stats span { color: var(--muted); font-size: .68rem; text-transform: uppercase; font-weight: 900; letter-spacing: 1px; }
.hero-image { position: relative; transform-style: preserve-3d; }
.image-ring { position: absolute; inset: 8%; border: 1px solid rgba(255,0,0,.35); border-radius: 50%; filter: blur(.1px); animation: spin 18s linear infinite; }
.image-ring::before, .image-ring::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 20px var(--red); }
.image-ring::before { top: 7%; left: 18%; }
.image-ring::after { right: 10%; bottom: 18%; }
@keyframes spin { to { transform: rotate(360deg); } }
.capa-img { width: 100%; filter: drop-shadow(0 30px 50px rgba(255,0,0,0.18)); animation: float 6s ease-in-out infinite; position: relative; z-index: 2; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.floating-badge { position: absolute; z-index: 3; background: rgba(8,8,8,.72); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(12px); padding: 12px 16px; border-radius: 999px; font-size: .72rem; font-weight: 900; letter-spacing: 1px; box-shadow: 0 15px 40px rgba(0,0,0,.35); animation: floatBadge 4s ease-in-out infinite; }
.badge-one { top: 18%; left: 0; }
.badge-two { right: 0; bottom: 20%; animation-delay: -2s; }
@keyframes floatBadge { 50% { transform: translateY(-12px); } }

.about { padding: 100px 0; background: linear-gradient(180deg, rgba(8,8,8,.92), rgba(5,5,5,.92)); position: relative; }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 52px; align-items: center; }
.about-img { position: relative; border-radius: 24px; }
.about-img::before { content: ""; position: absolute; inset: -1px; border-radius: 24px; background: linear-gradient(135deg, rgba(255,0,0,.7), transparent, rgba(255,255,255,.08)); z-index: -1; }
.about-img img { width: 100%; border-radius: 24px; filter: grayscale(100%) contrast(1.08); transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.about-img:hover img { filter: grayscale(0%) contrast(1.04); transform: scale(1.015); }
.about-content h2 { font-family: 'Syncopate', sans-serif; font-size: clamp(1.8rem, 4vw, 2.85rem); margin: 15px 0; line-height: 1.13; }
.about-content h2 span { color: var(--red); text-shadow: 0 0 25px rgba(255,0,0,.28); }
.about-content p { color: var(--gray); line-height: 1.85; font-size: 0.98rem; max-width: 610px; }
.stats { display: flex; gap: 20px; margin-top: 32px; flex-wrap: wrap; }
.stat-item { border: 1px solid var(--border); background: rgba(255,255,255,.035); padding: 20px 24px; border-radius: 18px; min-width: 145px; }
.stat-item strong { display: block; font-size: 1.65rem; color: var(--red); font-family: 'Syncopate'; text-shadow: 0 0 18px rgba(255,0,0,.28); }
.stat-item span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 900; }

.portfolio { padding: 100px 0; position: relative; }
.section-kicker { text-align: center; margin-bottom: 12px; }
.section-title { text-align: center; font-family: 'Syncopate', sans-serif; font-size: clamp(1.6rem, 4vw, 2.7rem); margin-bottom: 55px; }
.section-title span { color: var(--red); }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.card { height: 490px; perspective: 2000px; }
.card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1); transform-style: preserve-3d; }
.card:hover .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 24px; overflow: hidden; border: 1px solid var(--border); transition: 0.4s; box-shadow: 0 25px 80px rgba(0,0,0,.35); }
.card-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.72)); }
.card:hover .card-front, .card:hover .card-back { border-color: rgba(255,0,0,.58); box-shadow: 0 0 45px rgba(255, 0, 0, 0.22), 0 30px 80px rgba(0,0,0,.55); }
.card-front img { width: 100%; height: 100%; object-fit: cover; transition: 0.8s; }
.card:hover .card-front img { transform: scale(1.08); }
.project-number { position: absolute; left: 22px; bottom: 20px; z-index: 2; font-family: 'Syncopate'; font-size: .92rem; color: white; background: rgba(255,0,0,.85); padding: 9px 13px; border-radius: 12px; }
.card-back { background: radial-gradient(circle at top, rgba(255,0,0,.18), transparent 42%), var(--card-bg); transform: rotateY(180deg); display: flex; align-items: center; justify-content: center; padding: 25px; }
.card-back-content { border: 1px solid rgba(255,255,255,.09); width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 18px; padding: 24px; background: rgba(255,255,255,.025); }
.card-back h3 { font-family: 'Syncopate', sans-serif; font-size: 0.92rem; color: var(--red); margin-bottom: 15px; text-align: center; line-height: 1.5; }
.divider { width: 46px; height: 2px; background: var(--red); margin-bottom: 17px; box-shadow: 0 0 18px var(--red); }
.card-back p { color: var(--gray); font-size: 0.88rem; line-height: 1.6; text-align: center; margin-bottom: 22px; }
.card-tag { font-size: 0.62rem; color: #d5d5d5; border: 1px solid rgba(255,255,255,.16); padding: 7px 14px; border-radius: 50px; text-transform: uppercase; font-weight: 900; letter-spacing: 1px; }

.contact { padding: 100px 0; }
.contact-card { max-width: 650px; margin: 0 auto; background: radial-gradient(circle at top left, rgba(255,0,0,.18), transparent 35%), rgba(13,13,13,.88); padding: clamp(32px, 5vw, 62px); border-radius: 28px; border: 1px solid var(--border); box-shadow: 0 30px 90px rgba(0,0,0,.45); position: relative; overflow: hidden; }
.contact-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,.08), transparent 28%, transparent 70%, rgba(255,0,0,.12)); pointer-events: none; }
.contact-header { text-align: center; margin-bottom: 32px; position: relative; }
.contact-header h2 { font-family: 'Syncopate', sans-serif; font-size: clamp(1.3rem, 4vw, 1.75rem); margin: 12px 0; line-height: 1.3; }
.contact-header p { color: var(--gray); font-size: 0.86rem; line-height: 1.6; }
.contact-form { display: flex; flex-direction: column; gap: 15px; position: relative; }
.form-group input, .form-group select { width: 100%; background: rgba(5,5,5,.78); border: 1px solid rgba(255,255,255,.1); padding: 16px; border-radius: 13px; color: white; font-size: 0.92rem; outline: none; transition: 0.3s; }
.form-group input::placeholder { color: #6a6a6a; }
.form-group input:focus, .form-group select:focus { border-color: rgba(255,0,0,.75); box-shadow: 0 0 0 4px rgba(255,0,0,.12); transform: translateY(-2px); }
.btn-submit { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: white; border: none; padding: 18px; border-radius: 13px; font-weight: 900; cursor: pointer; transition: 0.4s; text-transform: uppercase; font-size: 0.86rem; margin-top: 10px; box-shadow: 0 18px 45px rgba(255,0,0,.24); }
.btn-submit:hover { transform: translateY(-4px); box-shadow: 0 18px 45px rgba(255,0,0,0.42); }

footer { padding: 42px 20px; text-align: center; color: #3d3d3d; font-size: 0.7rem; letter-spacing: 1px; border-top: 1px solid rgba(255,255,255,.045); }
.whatsapp-float { position: fixed; bottom: 22px; right: 22px; background: #25d366; width: 58px; height: 58px; border-radius: 50px; display: flex; align-items: center; justify-content: center; z-index: 1000; transition: 0.3s; box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 0 0 0 rgba(37,211,102,.55); animation: pulseWhats 2.5s infinite; }
.whatsapp-float:hover { transform: translateY(-5px) scale(1.04); }
.whatsapp-float img { width: 31px; }
@keyframes pulseWhats { 70% { box-shadow: 0 12px 28px rgba(0,0,0,0.45), 0 0 0 18px rgba(37,211,102,0); } }

.reveal-section { opacity: 0; transform: translateY(28px); transition: opacity .85s ease, transform .85s ease; }
.reveal-section.visible { opacity: 1; transform: translateY(0); }
.tilt-card { transition: transform .22s ease; }

@media (max-width: 992px) {
    .hero-wrapper { grid-template-columns: 1fr; text-align: center; gap: 44px; }
    .hero-text { order: 2; }
    .hero-image { order: 1; max-width: 430px; margin: 0 auto; }
    .hero-text h1 { min-height: auto; }
    .description { margin: 20px auto 34px; }
    .hero-actions, .hero-mini-stats { justify-content: center; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-img { max-width: 500px; margin: 0 auto; }
    .stats { justify-content: center; }
    .about-content p { margin: 0 auto; }
}

@media (max-width: 720px) {
    .menu-toggle { display: block; }
    .menu {
        position: fixed;
        inset: 0;
        height: 100vh;
        background: rgba(5,5,5,.96);
        backdrop-filter: blur(22px);
        flex-direction: column;
        justify-content: center;
        gap: 28px;
        transform: translateX(100%);
        transition: .38s ease;
        z-index: 1001;
    }
    .menu.active { transform: translateX(0); }
    .menu a { margin-left: 0; font-size: 1rem; }
    .nav-cta { padding: 13px 26px; }
    .hero { padding-top: 84px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn-main, .btn-ghost { width: 100%; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .card { height: 430px; }
    .contact-card { padding: 30px 20px; }
    .floating-badge { font-size: .62rem; padding: 10px 12px; }
    .badge-one { left: 4px; }
    .badge-two { right: 4px; }
    .cursor-glow { display: none; }
}

@media (max-width: 420px) {
    .logo { font-size: .9rem; }
    .hero-mini-stats { gap: 10px; }
    .hero-mini-stats div { flex: 1; min-width: 92px; padding: 12px 10px; }
    .stats { gap: 12px; }
    .stat-item { flex: 1; min-width: 130px; }
}


/* Atualização: mais cards no portfólio com visual mais cheio e vivo */
.portfolio-grid {
    align-items: stretch;
}
.card {
    animation: cardBreath 5.5s ease-in-out infinite;
}
.card:nth-child(2) { animation-delay: .25s; }
.card:nth-child(3) { animation-delay: .5s; }
.card:nth-child(4) { animation-delay: .75s; }
.card:nth-child(5) { animation-delay: 1s; }
.card:nth-child(6) { animation-delay: 1.25s; }
@keyframes cardBreath {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
}
.card-front::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.16), transparent 65%);
    transform: translateX(-130%);
    transition: .9s ease;
    pointer-events: none;
}
.card:hover .card-front::before {
    transform: translateX(130%);
}
@media (min-width: 1100px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
