/* ==========================================================================
   TOKENS — "Nanquim Autoral": tinta grossa + halftone sobre papel envelhecido
   ========================================================================== */
:root {
    --bg-color: #EFE1BE;
    --surface-color: #F8EFDA;
    --text-color: #241B14;
    --text-muted: #6B5A44;
    --outline-color: #1B140F;
    --divider-color: #D9C89C;

    --accent-color: #C23B1E;
    --accent-secondary: #1868B0;
    --accent-glow: rgba(194, 59, 30, 0.35);

    --project-offgrid: #235E5E;
    --project-webdev: #C68A2E;
    --project-fuzypulp: #7A3B5C;
    --project-pokebrew: #5B6B3A;

    --font-main: 'Arvo', Georgia, serif;
    --font-display: 'Bricolage Grotesque', 'Arvo', sans-serif;
    --font-tech: 'Space Mono', 'Courier New', monospace;

    --radius-blob: 30px 38px 26px 42px;
    --radius-card: 26px 34px 24px 36px;
    --radius-chip: 16px 20px 14px 18px;
    --radius-pill: 999px;

    --shadow-ink: 6px 6px 0 var(--outline-color);
    --shadow-ink-hover: 8px 8px 0 var(--outline-color);
    --shadow-ink-btn: 4px 4px 0 var(--outline-color);
    --shadow-ink-btn-hover: 6px 6px 0 var(--outline-color);

    --code-bg: #14100C;
    --code-border: #3A2C1F;
    --code-text: #C9BBA8;
    --code-muted: #7D6A52;
}

html { scroll-behavior: smooth; }

* { box-sizing: border-box; margin: 0; padding: 0; cursor: none; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    position: relative;
}

/* Grão de filme antigo — camada única, estática (animar custaria caro em
   telas fracas pra ganho perceptível baixo), 100% CSS/SVG inline. */
body::after {
    content: '';
    position: fixed; inset: 0; z-index: 9999; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
    opacity: 0.04;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

:focus-visible {
    outline: 3px solid var(--accent-secondary);
    outline-offset: 4px;
}

/* Respect users who disabled motion, and hide the fake cursor for anyone
   without real hover (touch, stylus, hybrid laptops) so nothing gets stuck. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (hover: none) {
    .cursor-dot, .cursor-outline { display: none; }
    * { cursor: auto; }
}

/* ==========================================================================
   CUSTOM CURSOR — gota de tinta em duas partes
   ========================================================================== */
.cursor-dot, .cursor-outline {
    position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
    pointer-events: none; z-index: 99999;
}
.cursor-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background-color: var(--accent-color);
    transition: background-color 0.2s ease;
}
.cursor-outline {
    width: 32px; height: 32px;
    border: 3px solid var(--outline-color);
    border-radius: 48% 52% 50% 46%;
    background: transparent;
    transition: width 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease;
}
body.hovering .cursor-outline { width: 48px; height: 48px; border-color: var(--accent-secondary); }
body.hovering .cursor-dot { background-color: var(--accent-secondary); }

/* ==========================================================================
   HEADER (fixo, efeito parallax por baixo do <main>)
   ========================================================================== */
header {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh; z-index: 0;
    display: flex; flex-direction: column; justify-content: center; padding: 4vw;
}

.title-mask { overflow: hidden; }

h1 {
    font-family: var(--font-display);
    color: var(--outline-color);
    font-size: 9vw; line-height: 0.95; text-transform: uppercase; letter-spacing: -0.01em; font-weight: 800;
    transform: translateY(110%); animation: revealText 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
h1.line-2 { animation-delay: 0.2s; }

@keyframes revealText { from { transform: translateY(110%); } to { transform: translateY(0); } }

.header-info-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 60px;
    opacity: 0; animation: fadeIn 1s ease forwards 1.4s; font-family: var(--font-tech);
    border-top: 3px solid var(--divider-color); padding-top: 30px;
}
.info-col h3 { color: var(--accent-color); font-size: 0.8rem; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 1px; }
.info-col li { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
@keyframes fadeIn { to { opacity: 1; } }

.available-dot { color: var(--project-pokebrew); margin-top: 5px; display: block; font-weight: bold; }

.scroll-indicator {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    font-size: 1.5rem; color: var(--text-muted); animation: fadeIn 1s ease forwards 2s, bounce 2s infinite 2s; opacity: 0;
}
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }

/* ==========================================================================
   MAIN (desliza por cima do header)
   ========================================================================== */
main {
    position: relative; z-index: 10;
    margin-top: 100vh;
    background-color: var(--surface-color);
    border-radius: 44px 44px 0 0;
    box-shadow: 0 -10px 30px rgba(27, 20, 15, 0.25);
    padding-top: 4vw; min-height: 100vh;
}

/* ==========================================================================
   SOBRE MIM
   ========================================================================== */
.about-section {
    padding: 8vw 4vw; border-bottom: 3px solid var(--divider-color);
    display: flex; gap: 60px; align-items: center;
}
.about-text { max-width: 820px; display: flex; flex-direction: column; gap: 20px; }
.about-text h2 {
    font-family: var(--font-display); font-weight: 700; font-size: 3vw; color: var(--outline-color);
    line-height: 1.2; text-transform: none; letter-spacing: -0.01em;
}
.about-text p { font-family: var(--font-main); color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; }
.about-text p.about-lead { color: var(--text-color); font-weight: 700; font-size: 1.2rem; }

/* Halftone crescendo nas bordas — a mesma trama de meio-tom da capa de um
   gibi vintage, sutil no centro e mais forte perto da moldura de tinta. */
.ink-halftone { position: relative; }
.ink-halftone::before {
    content: '';
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background-image: radial-gradient(circle, var(--outline-color) 1.3px, transparent 1.6px);
    background-size: 7px 7px;
    -webkit-mask-image: radial-gradient(circle, transparent 55%, black 100%);
    mask-image: radial-gradient(circle, transparent 55%, black 100%);
    opacity: 0.35;
    mix-blend-mode: multiply;
}

.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 60px; padding: 0 4vw 3vw 4vw; }
.filter-pill {
    display: inline-block;
    border: 3px solid var(--outline-color); background: var(--surface-color); color: var(--text-color);
    font-family: var(--font-tech); font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    padding: 10px 22px; border-radius: var(--radius-pill); cursor: pointer; pointer-events: auto;
    box-shadow: var(--shadow-ink-btn); transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.filter-pill:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-ink-btn-hover); }
.filter-pill.active { background: var(--accent-color); color: var(--surface-color); }
.filter-pill-jump:hover { background: var(--accent-secondary); color: var(--surface-color); border-color: var(--outline-color); }
.filter-divider { width: 3px; height: 24px; background: var(--divider-color); border-radius: 2px; margin: 0 4px; }
.projeto.filtered-out { display: none; }

.projeto { padding: 6vw 4vw; border-bottom: 3px solid var(--divider-color); display: flex; flex-direction: column; gap: 2rem; }
.projeto:last-child { border-bottom: none; }
.projeto.featured { border-bottom: 4px solid var(--accent-color); }

.projeto-img-wrapper {
    width: 100%; height: 60vh; background-color: var(--surface-color); overflow: hidden; position: relative; cursor: pointer;
    border-radius: var(--radius-blob); border: 4px solid var(--outline-color); box-shadow: var(--shadow-ink);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}
.projeto-img-wrapper:hover { transform: scale(1.008); box-shadow: var(--shadow-ink-hover); }
.projeto-img-wrapper.tall { height: 75vh; }
.parallax-img {
    width: 100%; height: 130%; object-fit: cover; position: absolute; top: -15%; left: 0;
}

.projeto-info { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.tags { font-family: var(--font-tech); font-size: 0.8rem; color: var(--accent-color); text-transform: uppercase; margin-bottom: 5px; display: block; font-weight: bold; }
.tags.tags-alt { color: var(--accent-secondary); }
.tags.tags-white { color: var(--text-color); }

.projeto-title { font-size: 2.5rem; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; color: var(--text-color); }
.projeto-title.big { font-size: 5vw; }

.botao-ver {
    border: 3px solid var(--outline-color); padding: 12px 35px; text-transform: uppercase;
    font-family: var(--font-tech); font-weight: 700; font-size: 0.85rem; border-radius: var(--radius-pill);
    background: var(--surface-color); color: var(--text-color); box-shadow: var(--shadow-ink-btn);
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
    pointer-events: auto;
}
.botao-ver:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-ink-btn-hover); background: var(--accent-color); color: var(--surface-color); }
.botao-ver:active { transform: translate(0, 0) scaleY(0.88); box-shadow: 2px 2px 0 var(--outline-color); }
.botao-ver.destaque { background: var(--accent-color); color: var(--surface-color); }
.botao-ver.destaque:hover { background: var(--outline-color); color: var(--surface-color); }
.botao-ver.outline-accent { border-color: var(--accent-color); color: var(--accent-color); }
.botao-ver.outline-accent:hover { background: var(--accent-color); color: var(--surface-color); border-color: var(--outline-color); }

/* Accent por projeto — a assinatura cromática de cada case study aparece
   já na vitrine, sem esperar o modal abrir. */
.projeto[data-project="offgrid"] .tags:not(.tags-alt) { color: var(--project-offgrid); }
.projeto[data-project="offgrid"] .projeto-img-wrapper { border-color: var(--project-offgrid); }
.projeto[data-project="offgrid"] .projeto-img-wrapper:hover { box-shadow: 8px 8px 0 var(--project-offgrid); }
.projeto[data-project="webdev"] .tags { color: var(--project-webdev); }
.projeto[data-project="webdev"] .projeto-img-wrapper { border-color: var(--project-webdev); }
.projeto[data-project="webdev"] .projeto-img-wrapper:hover { box-shadow: 8px 8px 0 var(--project-webdev); }
.projeto[data-project="fuzypulp"] .tags { color: var(--project-fuzypulp); }
.projeto[data-project="fuzypulp"] .projeto-img-wrapper { border-color: var(--project-fuzypulp); }
.projeto[data-project="fuzypulp"] .projeto-img-wrapper:hover { box-shadow: 8px 8px 0 var(--project-fuzypulp); }
.projeto[data-project="pokebrew"] .tags { color: var(--project-pokebrew); }
.projeto[data-project="pokebrew"] .projeto-img-wrapper { border-color: var(--project-pokebrew); }
.projeto[data-project="pokebrew"] .projeto-img-wrapper:hover { box-shadow: 8px 8px 0 var(--project-pokebrew); }

/* ==========================================================================
   SOCIAL MEDIA
   ========================================================================== */
.social-section { padding: 8vw 4vw; border-bottom: 3px solid var(--divider-color); overflow: hidden; }
.social-title { font-family: var(--font-display); font-weight: 800; font-size: 3.4vw; text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 60px; display: flex; align-items: center; gap: 20px; color: var(--text-color); }
.social-title .accent { color: var(--accent-color); }
.social-title .pill { color: var(--text-color); border: 3px solid var(--outline-color); font-family: var(--font-tech); font-size: 1rem; padding: 5px 15px; border-radius: var(--radius-pill); background: var(--surface-color); }
.social-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 40px 0; }
.social-card {
    background: var(--surface-color); aspect-ratio: 4/5; border-radius: var(--radius-card); border: 3px solid var(--outline-color);
    position: relative; cursor: pointer; box-shadow: var(--shadow-ink);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); transform: rotate(var(--rot)); overflow: hidden;
}
.social-card:hover { transform: scale(1.05, 0.96) rotate(0deg) translateY(-6px); z-index: 10; border-color: var(--accent-color); box-shadow: var(--shadow-ink-hover); }
.social-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.social-info {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 15px; background: linear-gradient(to top, rgba(27, 20, 15, 0.9), transparent);
    opacity: 0; transition: 0.3s; display: flex; justify-content: space-between; font-family: var(--font-tech); font-size: 0.8rem; color: var(--surface-color);
    z-index: 2;
}
.social-card:hover .social-info { opacity: 1; }

/* ==========================================================================
   BANNERS & E-COMMERCE
   ========================================================================== */
.showcase-section { padding: 8vw 4vw; border-bottom: 3px solid var(--divider-color); }
.showcase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.showcase-banner.wide { grid-column: span 2; aspect-ratio: 21/7; }
.showcase-banner {
    background: var(--surface-color); border-radius: var(--radius-card); border: 3px solid var(--outline-color);
    position: relative; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-ink);
    aspect-ratio: 16/9; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.showcase-banner:hover { border-color: var(--accent-color); box-shadow: var(--shadow-ink-hover); transform: scale(1.02, 0.98); }

.showcase-img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; transition: 0.5s; }
.showcase-banner:hover .showcase-img { transform: scale(1.05); }

.showcase-content {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; padding: 30px;
    display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(180deg, rgba(27, 20, 15, 0) 0%, rgba(27, 20, 15, 0.75) 80%); z-index: 2;
}
.showcase-tag {
    background: rgba(248, 239, 218, 0.9); border: 2px solid var(--outline-color);
    color: var(--text-color); padding: 5px 12px; border-radius: 6px; font-family: var(--font-tech); font-size: 0.8rem; align-self: flex-start; text-transform: uppercase; font-weight: bold;
}
.showcase-tag.destaque { background: var(--accent-color); color: var(--surface-color); border-color: var(--outline-color); }
.showcase-text h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; margin-bottom: 5px; color: var(--surface-color); text-shadow: 0 2px 6px rgba(27, 20, 15, 0.7); }
.showcase-btn-float {
    position: absolute; bottom: 30px; right: 30px; border: 3px solid var(--outline-color); color: var(--text-color); padding: 12px 25px; border-radius: var(--radius-pill);
    font-weight: bold; text-transform: uppercase; font-family: var(--font-tech); font-size: 0.8rem; background: rgba(248, 239, 218, 0.9);
    opacity: 0; transform: translateY(20px); transition: 0.3s;
}
.showcase-banner:hover .showcase-btn-float { opacity: 1; transform: translateY(0); background: var(--accent-color); color: var(--surface-color); }

/* ==========================================================================
   PHYSICAL ASSETS (bento grid)
   ========================================================================== */
.physical-section { padding: 8vw 4vw; border-bottom: 3px solid var(--divider-color); }
.physical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }

.phys-card {
    position: relative; border-radius: var(--radius-card); overflow: hidden; cursor: pointer;
    border: 3px solid var(--outline-color); background: var(--surface-color); box-shadow: var(--shadow-ink);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.phys-card.full { grid-column: span 2; aspect-ratio: 21/9; }
.phys-card.half { grid-column: span 1; aspect-ratio: 4/3; }
.phys-card.half:nth-child(odd) { --tilt: -1deg; }
.phys-card.half:nth-child(even) { --tilt: 1deg; }

.phys-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.phys-img.contain { object-fit: contain; padding: 20px; background: var(--surface-color); }

.phys-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    background: linear-gradient(to top, rgba(27, 20, 15, 0.92), transparent);
    display: flex; flex-direction: column; justify-content: flex-end;
    z-index: 2;
}

.phys-tag {
    font-family: var(--font-tech); color: var(--accent-color); font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 5px;
    display: flex; align-items: center; gap: 8px;
}
.phys-tag::before { content: ''; width: 6px; height: 6px; background: var(--accent-color); border-radius: 50%; }
.phys-overlay h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--surface-color); margin: 0; letter-spacing: 0; }

.phys-card:hover { border-color: var(--accent-color); box-shadow: var(--shadow-ink-hover); z-index: 2; transform: scale(1.02, 0.98) rotate(var(--tilt, 0deg)); }
.phys-card:hover .phys-img { transform: scale(1.03); }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color);
    z-index: 10002; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.5s ease;
}
.modal-overlay.lightbox { background: rgba(27, 20, 15, 0.94); transition: opacity 0.3s ease; }
.modal-overlay.ativo { opacity: 1; pointer-events: all; }

.modal-intro-title {
    position: absolute; width: 100%; text-align: center; font-size: 7vw;
    font-family: var(--font-display); font-weight: 800; text-transform: uppercase; color: var(--outline-color);
    opacity: 0; transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}
.modal-overlay.ativo .modal-intro-title { opacity: 1; transform: scale(1); }
.modal-overlay.ativo.conteudo-visivel .modal-intro-title {
    opacity: 0 !important;
    transform: scale(1.1) !important;
    filter: blur(20px);
    transition: all 0.8s ease-out;
}

.modal-scroll-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow-y: auto;
    padding: 100px 4vw 4vw 4vw;
    opacity: 0; transform: translateY(100px);
    transition: opacity 1s ease 0.2s, transform 1.2s cubic-bezier(0.19, 1, 0.22, 1) 0.1s;
}
.modal-overlay.lightbox .modal-scroll-container {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    transform: translateY(50px);
}
.modal-overlay.ativo.conteudo-visivel .modal-scroll-container { opacity: 1; transform: translateY(0); }

/* --- Carrossel de galeria (posts sociais / banners) --- */
.gallery-container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.carousel-wrapper {
    display: flex; gap: 0; overflow-x: scroll; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    width: 100%; max-width: 550px; height: 85vh; scrollbar-width: none;
}
.carousel-wrapper::-webkit-scrollbar { display: none; }
.carousel-slide { min-width: 100%; height: 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; position: relative; }
.carousel-slide img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-chip); box-shadow: 0 0 50px rgba(0, 0, 0, 0.6); }

.lightbox-img { max-width: 95vw; max-height: 95vh; object-fit: contain; border-radius: var(--radius-chip); box-shadow: 0 0 50px rgba(0, 0, 0, 0.6); animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.lightbox-single { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

@keyframes popIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); font-size: 4rem; color: rgba(248, 239, 218, 0.55); background: transparent; border: none;
    cursor: pointer; z-index: 100; padding: 20px; transition: 0.2s; user-select: none;
}
.nav-arrow:hover, .nav-arrow.hover { color: var(--accent-color); transform: translateY(-50%) scale(1.2); }
.nav-arrow.prev { left: 5%; }
.nav-arrow.next { right: 5%; }
.carousel-counter {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(27, 20, 15, 0.7); padding: 5px 15px; border-radius: var(--radius-pill);
    font-family: var(--font-tech); color: var(--surface-color); font-size: 0.9rem; border: 1px solid rgba(248, 239, 218, 0.3);
}

/* --- Conteúdo padrão dos case studies --- */
.modal-row { display: flex; gap: 60px; margin-bottom: 80px; align-items: center; width: 100%; }
.modal-row.reverse { flex-direction: row-reverse; }
.modal-col-text { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.modal-col-img {
    flex: 1.5; height: 60vh; border-radius: var(--radius-blob); overflow: hidden; width: 100%;
    background: var(--surface-color); border: 4px solid var(--outline-color); box-shadow: var(--shadow-ink);
}
.modal-col-img.transparent { background: transparent; border: none; box-shadow: none; }
.modal-col-img.long-img { height: 80vh; }
.modal-full-img {
    width: 100%; height: 80vh; border-radius: var(--radius-blob); overflow: hidden; margin-bottom: 80px; position: relative;
    border: 4px solid var(--outline-color); box-shadow: var(--shadow-ink);
}
.hero-img-container { background: var(--surface-color); display: flex; align-items: center; justify-content: center; }
.modal-col-img img, .modal-full-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.modal-col-img.contain-img img { object-fit: contain; }
.modal-col-img.long-img img { object-fit: contain; background: var(--surface-color); }
.modal-col-img:hover img, .modal-full-img:hover img { transform: scale(1.03); }
.modal-title-small { font-size: 2rem; color: var(--text-color); margin-bottom: 10px; font-family: var(--font-main); font-weight: bold; }
.modal-title-small.lg { font-size: 2.6rem; margin-top: 10px; }
.modal-title-small.hero { font-family: var(--font-display); font-weight: 800; font-size: 2.8rem; margin-top: 10px; line-height: 1.2; letter-spacing: -0.01em; }
.modal-p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; }
.modal-p.lead { font-size: 1.4rem; color: var(--text-color); margin-top: 20px; }
.modal-list { list-style: none; margin-top: 15px; color: var(--text-muted); line-height: 1.8; }
.modal-list strong { color: var(--text-color); }

.modal-intro-block { margin-bottom: 80px; max-width: 900px; }

.modal-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 80px; }
.modal-card { background: var(--surface-color); padding: 40px; border-radius: var(--radius-card); border: 3px solid var(--outline-color); box-shadow: var(--shadow-ink); }
.modal-card h4 { font-family: var(--font-display); font-weight: 800; color: var(--accent-color); font-size: 1.3rem; margin: 15px 0; text-transform: uppercase; }

.modal-code-block { width: 100%; max-width: 500px; background: var(--code-bg); border-radius: var(--radius-chip); border: 3px solid var(--code-border); overflow: hidden; font-family: var(--font-tech); text-align: left; box-shadow: var(--shadow-ink); }
.modal-code-bar { background: var(--code-border); padding: 10px 15px; border-bottom: 1px solid var(--outline-color); display: flex; gap: 8px; }
.modal-code-dot { width: 12px; height: 12px; border-radius: 50%; }
.modal-code-dot.red { background: #ff5f57; } .modal-code-dot.yellow { background: #febc2e; } .modal-code-dot.green { background: #28c840; }
.modal-code-body { padding: 25px; color: var(--code-text); font-size: 0.95rem; line-height: 1.6; }
.modal-code-body .kw { color: var(--accent-color); } .modal-code-body .str { color: var(--project-webdev); } .modal-code-body .fn { color: var(--surface-color); } .modal-code-body .cm { color: var(--code-muted); }

.modal-impact { background: var(--accent-color); padding: 60px 40px; border-radius: var(--radius-card); border: 4px solid var(--outline-color); box-shadow: var(--shadow-ink); margin-bottom: 80px; text-align: center; }
.modal-impact h3 { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; color: var(--surface-color); text-transform: uppercase; margin-bottom: 20px; }
.modal-impact-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; margin-top: 40px; }
.modal-impact-stat .num { font-size: 3rem; font-weight: 900; color: var(--surface-color); display: block; }
.modal-impact-stat .label { font-size: 1rem; color: var(--surface-color); opacity: 0.85; font-family: var(--font-tech); text-transform: uppercase; font-weight: bold; }

.modal-meta { border-top: 3px solid var(--divider-color); padding-top: 40px; display: flex; gap: 40px; margin-bottom: 100px; flex-wrap: wrap; }
.modal-meta strong { color: var(--text-color); display: block; margin-top: 4px; }

/* --- Grid de projetos de UX/dev --- */
.grid-ux { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.card-ux {
    background: var(--surface-color); border-radius: var(--radius-card); overflow: hidden; border: 3px solid var(--outline-color);
    transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); cursor: pointer; position: relative; height: 320px; display: flex; flex-direction: column; text-decoration: none;
    box-shadow: var(--shadow-ink);
}
.card-ux:hover { border-color: var(--accent-color); transform: scale(1.02, 0.98) translateY(-6px); box-shadow: var(--shadow-ink-hover); }
.browser-bar { height: 30px; background: var(--divider-color); border-bottom: 1px solid var(--outline-color); display: flex; align-items: center; padding: 0 10px; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.card-ux-img { width: 100%; height: 55%; object-fit: cover; border-bottom: 1px solid var(--outline-color); transition: 0.4s; object-position: top center; }
.card-ux:hover .card-ux-img { transform: scale(1.05); }
.card-ux-info { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; height: 45%; background: var(--bg-color); }
.card-ux-title { font-size: 1.1rem; font-weight: bold; color: var(--text-color); margin-bottom: 5px; }
.card-ux-desc { font-size: 0.85rem; color: var(--text-muted); font-family: var(--font-tech); line-height: 1.4; }
.card-ux-btn { margin-top: auto; color: var(--accent-color); font-size: 0.8rem; text-transform: uppercase; font-weight: bold; display: flex; align-items: center; gap: 5px; letter-spacing: 1px; }

/* Card compacto para links sem screenshot ainda — referência de projeto sem
   parecer "em construção". */
.card-ux-compact { height: auto; min-height: 140px; justify-content: center; }
.card-ux-compact .card-ux-info { height: auto; padding: 28px 24px; }

/* --- E-mail Marketing (preview em iframe ao vivo, sem depender de print) --- */
.email-section { padding: 8vw 4vw; border-bottom: 3px solid var(--divider-color); }
.email-grid { grid-template-columns: repeat(3, 1fr); }
.card-ux-preview { width: 100%; height: 55%; overflow: hidden; position: relative; border-bottom: 1px solid var(--outline-color); background: var(--surface-color); }
.card-ux-preview iframe { width: 100%; height: 900px; border: none; display: block; pointer-events: none; }

.btn-fechar {
    position: fixed; top: 30px; right: 30px; width: 50px; height: 50px; border-radius: 50%;
    background: var(--surface-color); border: 3px solid var(--outline-color); color: var(--outline-color);
    font-size: 1.3rem; z-index: 10003; cursor: pointer; transition: 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-ink-btn);
}
.btn-fechar:hover { background: var(--accent-color); color: var(--surface-color); transform: translate(-2px, -2px); box-shadow: var(--shadow-ink-btn-hover); }

/* ==========================================================================
   MENU FLUTUANTE ("carimbo de tinta")
   ========================================================================== */
.gamer-nav-container { position: fixed; bottom: 30px; right: 30px; z-index: 10000; display: flex; flex-direction: column-reverse; align-items: flex-end; pointer-events: none; }
.gamer-nav-container > * { pointer-events: auto; }
.gamer-trigger {
    width: 68px; height: 68px; background: var(--accent-color); border: 4px solid var(--outline-color);
    border-radius: 42% 58% 55% 45%; display: flex; align-items: center; justify-content: center; cursor: pointer;
    position: relative; box-shadow: var(--shadow-ink-btn); transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    z-index: 2; pointer-events: auto;
}
.gamer-icon { font-size: 1.7rem; color: var(--surface-color); transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.gamer-nav-container.active .gamer-trigger, .gamer-nav-container:hover .gamer-trigger { transform: translate(-2px, -2px) rotate(-4deg); box-shadow: var(--shadow-ink-btn-hover); }
.gamer-nav-container.active .gamer-icon, .gamer-nav-container:hover .gamer-icon { transform: scale(1.15) rotate(8deg); }
.gamer-menu {
    position: absolute; bottom: 85px; right: 0; background: var(--surface-color); border: 4px solid var(--outline-color);
    padding: 18px 20px; width: 190px; border-radius: 28px 40px 24px 44px; box-shadow: var(--shadow-ink);
    transform-origin: bottom right; transform: scale(0.3) translateY(20px); opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: none; z-index: 1;
}
.gamer-menu::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 20px; background: transparent; }
.gamer-nav-container.active .gamer-menu { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; }
@media (hover: hover) { .gamer-nav-container:hover .gamer-menu { transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; } }
.gamer-title { font-family: var(--font-tech); color: var(--accent-color); text-transform: uppercase; font-size: 0.8rem; margin-bottom: 10px; letter-spacing: 2px; border-bottom: 2px dashed var(--divider-color); padding-bottom: 5px; }
.gamer-item { display: block; padding: 8px 0; color: var(--text-muted); font-family: var(--font-tech); font-size: 0.9rem; text-transform: uppercase; text-decoration: none; transition: 0.2s; position: relative; pointer-events: auto; }
.gamer-item:hover { color: var(--accent-color); padding-left: 15px; }
.gamer-item:hover::before {
    content: ''; position: absolute; left: 0; top: 50%; margin-top: -3px; width: 6px; height: 6px;
    background: var(--accent-color); border-radius: 50%; animation: popDot 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popDot { from { transform: scale(0); } to { transform: scale(1); } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer { padding: 0; background: var(--surface-color); overflow: hidden; display: flex; flex-direction: column; }
.marquee-container { background: var(--accent-color); padding: 15px 0; width: 100%; overflow: hidden; white-space: nowrap; position: relative; z-index: 2; }
/* Exatamente 2 cópias do conteúdo: translateX(-50%) percorre uma cópia inteira
   e o loop reinicia sem salto. Uma 3ª cópia quebraria o alinhamento. */
.marquee-track { display: flex; gap: 0; width: max-content; animation: scroll 20s linear infinite; will-change: transform; }
.marquee-item { font-family: var(--font-tech); font-weight: bold; font-size: 1.2rem; color: var(--surface-color); margin-right: 50px; text-transform: uppercase; white-space: nowrap; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.footer-content { padding: 8vw 4vw; text-align: left; }
.footer-title { font-size: 1.5rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; display: block; margin-top: 20px; }
.big-email { font-family: var(--font-main); font-weight: 700; font-size: 4.5vw; color: var(--text-color); text-transform: uppercase; line-height: 1.3; display: inline-block; border-bottom: 3px solid var(--divider-color); padding-bottom: 10px; margin-bottom: 60px; transition: 0.3s; }
.big-email:hover { color: var(--accent-color); border-color: var(--accent-color); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 3px solid var(--divider-color); padding-top: 40px; }
.social-link { font-size: 1.2rem; display: block; margin-bottom: 10px; color: var(--text-muted); }
.social-link:hover { color: var(--accent-color); text-decoration: underline; }
.footer-muted { color: var(--text-muted); margin-bottom: 10px; }
.footer-online { color: var(--project-pokebrew); margin-top: 20px; font-weight: bold; }

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 768px) {
    h1 { font-size: 13vw; line-height: 0.9; }
    .header-info-grid { grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 40px; }
    .about-section { flex-direction: column; }
    .filter-bar { margin-top: 40px; }
    .filter-divider { display: none; }
    .about-text h2 { font-size: 7vw; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .grid-ux { grid-template-columns: 1fr; }
    .modal-row, .modal-row.reverse { flex-direction: column; gap: 30px; }
    .modal-col-img, .modal-full-img { height: 40vh; width: 100%; }
    .modal-intro-title { font-size: 13vw; }
    .big-email { font-size: 6.5vw; word-break: break-all; }
    .projeto { padding: 12vw 5vw; }
    .projeto-img-wrapper { height: 50vh; }
    .projeto-img-wrapper.tall { height: 50vh; }
    .modal-p { font-size: 1rem; }
    .modal-scroll-container { padding: 100px 5vw 5vw 5vw; }
    .projeto:nth-of-type(2) .parallax-img { object-position: 25% center !important; }

    .social-title { font-size: 9vw; margin-bottom: 30px; }
    .social-grid { display: flex; overflow-x: auto; gap: 20px; padding-bottom: 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
    .social-card { min-width: 250px; transform: none !important; scroll-snap-align: center; }
    .social-grid::-webkit-scrollbar { display: none; }

    .showcase-grid { grid-template-columns: 1fr; }
    .showcase-banner.wide { grid-column: span 1; aspect-ratio: 16/9; }
    .showcase-text h3 { font-size: 1.5rem; }
    .showcase-btn-float { opacity: 1; transform: translateY(0); padding: 10px 20px; font-size: 0.8rem; bottom: 20px; right: 20px; }

    .physical-grid { grid-template-columns: 1fr; }
    .phys-card.full, .phys-card.half { grid-column: span 1; aspect-ratio: 16/9; }

    .nav-arrow { font-size: 2.5rem; padding: 10px; background: rgba(27, 20, 15, 0.4); border-radius: 50%; }
    .nav-arrow.prev { left: 10px; }
    .nav-arrow.next { right: 10px; }
    .carousel-wrapper { max-width: 100%; }
}
