/* ══════════════════════════════════════
   PORTFOLIO — Page-specific Styles
   ══════════════════════════════════════ */

/* ── HEADER / NAV ── */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: #000000;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.header-inner {
    max-width: var(--max); margin: 0 auto; padding: 0 var(--gap);
    height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative; z-index: 2;
}
@media (max-width: 768px) {
    .header-inner { padding: 0 1.25rem; }
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
    font-size: .82rem; font-weight: 500; color: #aaaaaa;
    transition: color .2s var(--ease); position: relative;
}
.nav a:hover, .nav a.active { color: #ffffff; }
.nav a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--accent);
    transition: width .2s var(--ease);
}
.nav a:hover::after, .nav a.active::after { width: 100%; }


/* Mobile menu */
.menu-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 36px; height: 36px; position: relative;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-toggle span {
    display: block; width: 24px; height: 2.5px; background: var(--white);
    border-radius: 2px; transition: all .3s var(--ease);
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(2.5px, 2.5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(2.5px, -2.5px); }

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav {
        position: fixed; top: 60px; left: 0; right: 0;
        background: rgba(13,17,23,1); backdrop-filter: blur(20px);
        flex-direction: column; align-items: flex-start; padding: 2rem 1.25rem;
        gap: 1.5rem; border-bottom: 1px solid var(--accent-bd);
        transform: translateY(-110%); visibility: hidden;
        transition: transform .3s var(--ease), visibility .3s;
        z-index: 1;
    }
    .nav.open { transform: translateY(0); visibility: visible; }
    .nav a { font-size: 1rem; }
    .nav-cta { text-align: center; width: 100%; padding: .6rem; }
}


/* ── HERO ── */
.hero {
    position: relative; overflow: hidden;
    padding: 60px 0 0;
    display: flex; flex-direction: column;
    min-height: 100vh; min-height: 100svh;
    isolation: isolate;
}
.hero::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.04) 0%, transparent 60%);
    transform: translateY(var(--parallax-y, 0));
    will-change: transform;
    z-index: 0;
}
.hero-inner {
    position: relative; z-index: 2;
    max-width: var(--max); margin: 0 auto; padding: 0 var(--gap);
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    width: 100%;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--accent); background: var(--accent-bg);
    border: 1px solid var(--accent-bd);
    padding: .4rem 1.2rem; border-radius: 50px; margin-bottom: 1.5rem;
    position: relative;
}
.hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse-dot 2s var(--ease) infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .5; transform: scale(.8); }
}
.hero h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.4rem); font-weight: 800;
    line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 1.4rem;
    color: #ffffff;
}
.hero p {
    font-size: 1.02rem; color: var(--g1); line-height: 1.8;
    margin-bottom: 2.2rem;
    max-width: 560px;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }


/* ── MARQUEE ── */
.marquee {
    overflow: hidden; white-space: nowrap;
    background: var(--bg-2);
    border-top: 1px solid rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.04);
    padding: .9rem 0;
    margin-top: auto;
    width: 100%;
}
.marquee-track {
    display: inline-flex;
    animation: marquee 30s linear infinite;
}
.marquee-track span {
    font-family: var(--mono);
    font-size: .7rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--g3);
    flex-shrink: 0;
}
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* ── SECTIONS (generic) ── */
.section {
    padding: 4.5rem 0;
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    position: relative;
}
.section-label {
    font-family: var(--mono);
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2.5px; color: var(--accent); margin-bottom: .6rem;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 800;
    letter-spacing: -1px; margin-bottom: 1rem;
    line-height: 1.15;
}
.section-desc {
    font-size: .92rem; color: var(--g1); line-height: 1.8;
}
.section-divider {
    border: none; border-top: 1px solid rgba(255,255,255,.04);
}


/* ── SOBRE ── */
.sobre-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 3rem; margin-top: 2rem; align-items: start;
}
@media (max-width: 768px) { .sobre-grid { grid-template-columns: 1fr; gap: 2rem; } }

.sobre-text p {
    font-size: .9rem; color: var(--g1); line-height: 1.9;
    margin-bottom: 1rem;
}
.sobre-text p strong { color: #ffffff; font-weight: 600; }

.diferencial-card {
    background: var(--bg-2);
    border: 1px solid rgba(255,255,255,.05);
    border-left: 3px solid var(--accent);
    border-radius: var(--r); padding: 1.2rem 1.4rem;
    margin-bottom: .8rem;
    transition: border-color .2s var(--ease);
}
.diferencial-card:hover { border-left-color: var(--accent-lt); }
.diferencial-card h4 {
    font-size: .82rem; font-weight: 700; margin-bottom: .3rem;
}
.diferencial-card p {
    font-size: .78rem; color: var(--g2); line-height: 1.6;
}


/* ── SERVICOS ── */
.servicos-grid {
    display: grid; grid-template-columns: repeat(6, 1fr);
    gap: 1rem; margin-top: 2rem;
}
.servico-card:nth-child(-n+3) { grid-column: span 2; }
.servico-card:nth-child(4) { grid-column: 1 / 4; }
.servico-card:nth-child(5) { grid-column: 4 / 7; }
@media (max-width: 900px) {
    .servicos-grid { grid-template-columns: repeat(2, 1fr); }
    .servico-card:nth-child(-n+3),
    .servico-card:nth-child(4),
    .servico-card:nth-child(5) { grid-column: span 1; }
}
@media (max-width: 560px) {
    .servicos-grid { grid-template-columns: 1fr; }
}

.servico-card {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--r-lg); padding: 1.8rem 1.6rem;
    cursor: default;
    transition: all .3s var(--ease);
}
.servico-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.servico-card[data-theme="tech"]:hover     { border-color: var(--c-tech-bd); }
.servico-card[data-theme="design"]:hover   { border-color: var(--c-design-bd); }
.servico-card[data-theme="trafego"]:hover  { border-color: var(--c-trafego-bd); }
.servico-card[data-theme="social"]:hover   { border-color: var(--c-social-bd); }
.servico-card[data-theme="automacao"]:hover { border-color: var(--c-automacao-bd); }

.servico-card h3 {
    font-size: .95rem; font-weight: 700; margin-bottom: .4rem;
}
.servico-card[data-theme="tech"]     h3 { color: var(--c-tech); }
.servico-card[data-theme="design"]   h3 { color: var(--c-design); }
.servico-card[data-theme="trafego"]  h3 { color: var(--c-trafego); }
.servico-card[data-theme="social"]   h3 { color: var(--c-social); }
.servico-card[data-theme="automacao"] h3 { color: var(--c-automacao); }

.servico-card p {
    font-size: .82rem; color: var(--g2); line-height: 1.65;
}


/* ── PORTFOLIO / PROJECTS ── */
.filter-tabs {
    display: flex; gap: .5rem; margin-bottom: 1.5rem;
    flex-wrap: wrap; margin-top: 1.5rem;
}
.tab {
    padding: .45rem 1rem; border-radius: 50px;
    font-size: .72rem; font-weight: 600; cursor: pointer;
    background: rgba(255,255,255,.04); color: var(--g2);
    border: 1px solid transparent;
    transition: all .2s var(--ease);
    min-width: 120px; text-align: center;
}
.tab:hover { color: var(--white); background: rgba(255,255,255,.06); }
.tab.active { color: var(--accent); background: var(--accent-bg); border-color: var(--accent-bd); }

.tab[data-filter="tech"].active     { color: var(--c-tech);     background: var(--c-tech-bg);     border-color: var(--c-tech-bd); }
.tab[data-filter="design"].active   { color: var(--c-design);   background: var(--c-design-bg);   border-color: var(--c-design-bd); }
.tab[data-filter="trafego"].active  { color: var(--c-trafego);  background: var(--c-trafego-bg);  border-color: var(--c-trafego-bd); }
.tab[data-filter="social"].active   { color: var(--c-social);   background: var(--c-social-bg);   border-color: var(--c-social-bd); }
.tab[data-filter="automacao"].active{ color: var(--c-automacao); background: var(--c-automacao-bg); border-color: var(--c-automacao-bd); }
.projects-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}
@media (max-width: 768px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--r-lg); padding: 1.6rem;
    transition: all .3s var(--ease);
}
.project-card:hover {
    border-color: rgba(255,255,255,.12);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.project-card.hidden {
    display: none;
}
.project-header {
    display: flex; justify-content: space-between;
    align-items: flex-start; margin-bottom: .8rem;
}
.project-card h3 {
    font-size: 1rem; font-weight: 700; line-height: 1.3;
}
.project-card p {
    font-size: .84rem; color: var(--g2); line-height: 1.7;
    margin-bottom: 1rem;
}
.project-tags {
    display: flex; flex-wrap: wrap; gap: .4rem;
}
.project-tag {
    font-size: .58rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px;
    padding: .2rem .55rem; border-radius: 4px;
    background: rgba(255,255,255,.04); color: var(--g2);
}

/* Project card theme colors on hover */
.project-card[data-category="tech"]:hover     { border-color: var(--c-tech-bd); }
.project-card[data-category="design"]:hover   { border-color: var(--c-design-bd); }
.project-card[data-category="trafego"]:hover  { border-color: var(--c-trafego-bd); }
.project-card[data-category="social"]:hover   { border-color: var(--c-social-bd); }
.project-card[data-category="automacao"]:hover { border-color: var(--c-automacao-bd); }

/* ══════════════════════════════════════
   CASES REAIS — Rectangular Cards
   ══════════════════════════════════════ */
.cases-section {
    position: relative; overflow: hidden;
    background: linear-gradient(180deg, var(--bg-0), var(--bg-1) 15%, var(--bg-1) 85%, var(--bg-0));
    padding: 5rem 0 6rem;
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    isolation: isolate;
}
.parallax-bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255,255,255,.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255,255,255,.02) 0%, transparent 50%);
    will-change: transform;
}

/* ── Carousel ── */
.cases-carousel {
    position: relative;
    overflow: hidden;
    margin: 2rem calc(-1 * var(--gap)) 0;
    padding: 1.5rem 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.cases-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: scroll-cases 55s linear infinite;
}
.cases-track:hover {
    animation-play-state: paused;
}

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

/* ── Case Card (rectangular) ── */
.case-card {
    display: flex; flex-direction: column;
    min-width: 420px; max-width: 420px;
    background: var(--bg-2);
    border: 1px solid rgba(255,255,255,.06);
    border-left: 3px solid var(--c-opensource-bd);
    border-radius: 14px;
    padding: 1.8rem 2rem;
    text-decoration: none; color: inherit;
    cursor: pointer;
    transition: all .35s var(--ease);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Subtle top glow line */
.case-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--c-opensource-bd), transparent 60%);
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.case-card:hover::before { opacity: 1; }

.case-card:hover {
    border-color: var(--c-opensource-bd);
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0,0,0,.45),
        0 0 30px rgba(251,191,36,.06);
}

/* ── Header (meta + title) ── */
.case-header { margin-bottom: .6rem; }

.case-meta {
    display: flex; align-items: center; gap: .4rem;
    margin-bottom: .5rem;
}
.case-number {
    font-family: var(--mono);
    font-size: .6rem; font-weight: 800;
    color: var(--c-opensource);
    background: var(--c-opensource-bg);
    border: 1px solid var(--c-opensource-bd);
    padding: .15rem .45rem; border-radius: 4px;
    letter-spacing: 1px;
    line-height: 1;
}
.case-badge {
    font-size: .5rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .8px;
    padding: .15rem .5rem; border-radius: 50px;
    background: rgba(255,255,255,.04);
    color: var(--g2);
}

.case-card h3 {
    font-size: 1.05rem; font-weight: 700;
    line-height: 1.3;
    transition: color .2s var(--ease);
}
.case-card:hover h3 { color: var(--c-opensource); }

.case-card p {
    font-size: .85rem; color: var(--g2); line-height: 1.7;
    margin-bottom: 1rem; flex: 1;
}

.case-tags {
    display: flex; flex-wrap: wrap; gap: .35rem;
    margin-bottom: 1rem;
}

/* ── Action links ── */
.case-actions {
    display: flex; gap: .5rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(255,255,255,.04);
}

.case-link-demo, .case-link-code {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .65rem; font-weight: 600;
    padding: .35rem .7rem; border-radius: 6px;
    transition: all .2s var(--ease);
    text-decoration: none;
}
.case-link-demo svg, .case-link-code svg {
    width: 12px; height: 12px; stroke: currentColor;
    fill: none; stroke-width: 2;
}

.case-link-demo {
    color: var(--c-opensource);
    background: var(--c-opensource-bg);
    border: 1px solid var(--c-opensource-bd);
}
.case-card:hover .case-link-demo {
    background: var(--c-opensource);
    color: var(--bg-0);
    border-color: var(--c-opensource);
}

.case-link-code {
    color: var(--g2);
    border: 1px solid rgba(255,255,255,.08);
}
.case-link-code:hover {
    color: var(--white);
    border-color: rgba(255,255,255,.2);
    background: rgba(255,255,255,.04);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .case-card { min-width: 340px; max-width: 340px; padding: 1.5rem; }
    .cases-track { animation-duration: 45s; }
    .cases-carousel {
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
        mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    }
}
@media (max-width: 560px) {
    .case-card { min-width: 300px; max-width: 300px; padding: 1.3rem; }
    .case-actions { flex-direction: column; }
    .cases-track { gap: 1rem; animation-duration: 40s; }
}


/* ── CTA / CONTATO ── */
.cta {
    padding: 4rem 0 10rem;
    background: transparent;
    position: relative;
    overflow: hidden;
    min-height: 100vh; min-height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
}
.cta .wrap { position: relative; z-index: 1; }
.cta h2 {
    color: #ffffff;
}
.cta::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at 50% 100%, rgba(255,255,255,.03) 0%, transparent 60%);
}
.cta-inner { position: relative; z-index: 1; }
.cta h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800;
    margin-bottom: .8rem;
}
.cta p { color: var(--g2); margin-bottom: 2rem; font-size: .92rem; }

.cta-links {
    display: flex; gap: 1rem; flex-wrap: wrap;
}
.cta-link {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1.5rem; border-radius: var(--r);
    border: 1.5px solid rgba(255,255,255,.08);
    font-size: .82rem; font-weight: 600; color: var(--g1);
    transition: all .2s var(--ease);
}
.cta-link:hover {
    border-color: var(--accent-bd); color: var(--accent);
    background: var(--accent-bg); transform: translateY(-1px);
}
.cta-link svg {
    width: 18px; height: 18px; stroke: currentColor;
    fill: none; stroke-width: 2;
}


/* ── FOOTER ── */
.footer {
    max-width: var(--max); margin: 0 auto;
    padding: 2.5rem var(--gap);
    border-top: 1px solid rgba(255,255,255,.04);
}
.footer-links {
    display: flex; gap: 1.5rem;
    margin-bottom: 1rem;
}
.footer-links a {
    color: var(--g3); font-size: .78rem; font-weight: 500;
    transition: color .2s var(--ease);
}
.footer-links a:hover { color: #ffffff; }
.footer p {
    font-size: .68rem; color: var(--g3);
}
.footer p strong { color: var(--g2); }


/* ══════════════════════════════════════
   RESPONSIVE — Mobile
   ══════════════════════════════════════ */

/* ── Tablet (≤768px) ── */
@media (max-width: 768px) {
    .hero { padding: 60px 0 0; }
    .hero-inner { padding: 0 1.25rem; }
    .hero h1 { font-size: 1.6rem; letter-spacing: -.5px; }
    .hero p { font-size: .88rem; }
    .hero-buttons { gap: .75rem; }

    .section { padding: 3rem 0; }
    .section-title { font-size: 1.3rem; }

    .tab { min-width: auto; padding: .4rem .8rem; font-size: .68rem; }

    .cta { padding: 2.5rem 0 6rem; }
    .cta-links { gap: .75rem; }
    .cta-link { padding: .6rem 1rem; font-size: .76rem; }

    .footer-links { flex-wrap: wrap; gap: 1rem; }

    .cases-section { padding: 3.5rem 0 4rem; }
}

/* ── Mobile (≤560px) ── */
@media (max-width: 560px) {
    .hero { padding: 60px 0 0; }
    .hero h1 { font-size: 1.35rem; line-height: 1.25; }
    .hero p { font-size: .82rem; line-height: 1.7; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; text-align: left; }

    .section { padding: 2.5rem 0; }
    .section-title { font-size: 1.15rem; }
    .section-desc { font-size: .82rem; }

    .marquee-track span { font-size: .6rem; }

    .diferencial-card { padding: 1rem 1.1rem; }
    .diferencial-card h4 { font-size: .78rem; }
    .diferencial-card p { font-size: .72rem; }

    .servico-card { padding: 1.2rem; }
    .servico-icon { font-size: 1.5rem; margin-bottom: .5rem; }
    .servico-card h3 { font-size: .82rem; }
    .servico-card p { font-size: .72rem; }

    .filter-tabs { gap: .35rem; }
    .tab { min-width: auto; padding: .35rem .65rem; font-size: .62rem; }

    .project-card { padding: 1.2rem; border-radius: 10px; }
    .project-card h3 { font-size: .84rem; }
    .project-card p { font-size: .72rem; }
    .project-tag { font-size: .52rem; }

    .cases-section { padding: 2.5rem 0 3rem; }

    .cta h2 { font-size: 1.15rem; }
    .cta p { font-size: .82rem; }
    .cta { padding: 2rem 0 5rem; }
    .cta-links { flex-direction: column; }
    .cta-link { width: 100%; justify-content: flex-start; padding: .7rem 1rem; }

    .footer { padding: 1.5rem 1.25rem; }
    .footer-links { gap: .8rem; }
    .footer-links a { font-size: .72rem; }
    .footer p { font-size: .6rem; }
}

/* ── Small Mobile (≤380px) ── */
@media (max-width: 380px) {
    .hero { padding: 60px 0 0; }
    .hero h1 { font-size: 1.15rem; }

    .nav.open { padding: 1.5rem 1rem; }
    .nav.open a { font-size: .88rem; }

    .sobre-text p { font-size: .8rem; }
}


/* ── ANIMATIONS (scroll reveal) ── */
.reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.reveal.visible {
    opacity: 1; transform: translateY(0);
}

/* Staggered children */
.reveal-children > * {
    opacity: 0; transform: translateY(16px);
    transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.reveal-children.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-children.visible > *:nth-child(2) { transition-delay: .08s; }
.reveal-children.visible > *:nth-child(3) { transition-delay: .16s; }
.reveal-children.visible > *:nth-child(4) { transition-delay: .24s; }
.reveal-children.visible > *:nth-child(5) { transition-delay: .32s; }
.reveal-children.visible > *:nth-child(6) { transition-delay: .40s; }
.reveal-children.visible > *:nth-child(7) { transition-delay: .48s; }
.reveal-children.visible > * {
    opacity: 1; transform: translateY(0);
}
