/* =====================================================================
   ÍNDICE (procure pelo título da seção com Ctrl+F)
   Cores e curvas · Base · Intro · Títulos animados · Barra do topo ·
   Troca de tema · Hero · Cabeçalho das seções · Projetos · Selo de status ·
   Diplomas · Contato · Footer · Onda ao clicar · Entrada ao rolar ·
   Responsivo (1400 / 1100 / 900 / 800 / 400) · Toque · Movimento reduzido ·
   Hero: foto + carrossel · Foco visível · Menu mobile · Acessibilidade
   ===================================================================== */

/* ===== Cores e curvas de movimento ===== */
:root {
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

    --bg: #0d0d0d;
    --superficie: #171717;
    --elevado: #1f1f1f;
    --texto: #f7f7f5;
    --cinza: #999;
    --borda: #424242;

    /* espaçamento vertical escalável (usado nas seções) */
    --secao-y: clamp(64px, 10vw, 120px);
    --secao-y-cert: clamp(80px, 12vw, 145px);
}

body.claro {
    --bg: #f3f3f0;
    --superficie: #fff;
    --elevado: #d9d9d9;
    --texto: #0d0d0d;
    --cinza: #5d5d5d;
    --borda: #ababab;
}

/* ===== Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--texto);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
    transition: background .4s var(--ease-out), color .4s var(--ease-out);
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
.brand {
    font-family: 'Barlow Condensed', Impact, sans-serif;
    text-transform: uppercase;
}

section {
    padding: var(--secao-y) 0;
}

.conteudo {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

h1 {
    font-size: clamp(52px, 8.2vw, 118px);
    font-weight: 900;
    line-height: .8;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

h2 {
    font-size: clamp(42px, 7vw, 94px);
    font-weight: 900;
    line-height: .8;
    letter-spacing: -.035em;
}

.contorno {
    display: block;
    color: transparent;
    -webkit-text-stroke: 2px var(--texto);
}

h1 .contorno {
    margin-left: 54px;
    transform: rotate(-1.4deg);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--cinza);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.eyebrow span {
    color: var(--texto);
    font: 800 17px 'Barlow Condensed', sans-serif;
}

/* ===== Intro (tela de carregamento) ===== */
body.carregando {
    overflow: hidden;
}

#intro {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 64px;
    background: #0d0d0d;
    transition: opacity .9s var(--ease-out), visibility 0s linear .9s;
}

#intro.saindo {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-logo {
    width: 96px;
    mix-blend-mode: lighten;
    animation: logo-entra 1.2s var(--ease-out) backwards;
}

@keyframes logo-entra {
    from {
        opacity: 0;
        transform: scale(.85);
    }
}

#intro.saindo .intro-logo {
    transform: scale(1.12);
    transition: transform .9s var(--ease-out);
}

.spinner {
    position: relative;
    width: 42px;
    height: 42px;
    animation: spinner-entra .6s .5s backwards;
}

@keyframes spinner-entra {
    from {
        opacity: 0;
    }
}

.spinner span {
    position: absolute;
    inset: 0;
    animation: orbita 2.2s cubic-bezier(.4, 0, .2, 1) infinite,
        orbita-opacidade 2.2s linear infinite;
    animation-fill-mode: backwards;
}

.spinner span::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: #f7f7f5;
}

.spinner span:nth-child(2) {
    animation-delay: .14s;
}

.spinner span:nth-child(3) {
    animation-delay: .28s;
}

.spinner span:nth-child(4) {
    animation-delay: .42s;
}

.spinner span:nth-child(5) {
    animation-delay: .56s;
}

@keyframes orbita {
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbita-opacidade {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

body.carregando :where(header, main, footer) *,
body.carregando :where(header, main, footer) *::before,
body.carregando :where(header, main, footer) *::after {
    animation-play-state: paused !important;
}

/* ===== Títulos animados (letra por letra) ===== */
.palavra {
    display: inline-block;
    white-space: nowrap;
}

.letra {
    display: inline-block;
    transition: transform .4s var(--ease-spring), color .3s var(--ease-out);
}

.titulo-anima:not(.visivel) .letra {
    opacity: 0;
}

.titulo-anima.visivel .letra {
    animation: letra-entra .9s var(--ease-out) backwards;
    animation-delay: calc(var(--i) * var(--passo, 35ms));
}

h1.titulo-anima {
    --passo: 55ms;
}

@keyframes letra-entra {
    0% {
        opacity: 0;
        transform: translateY(80px) rotate(-20deg) scale(.5);
    }

    60% {
        opacity: 1;
        transform: translateY(-10px) rotate(5deg) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

.titulo-anima .letra:hover {
    transform: translateY(-10px) rotate(-5deg);
}

.contorno .letra:hover {
    color: var(--texto);
}

/* ===== Barra do topo ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 78px;
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
    background: var(--bg);
    border-bottom: 1px solid var(--borda);
    transition: background .4s var(--ease-out), border-color .4s var(--ease-out);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    font-size: 22px;
    font-weight: 800;
}

.logo {
    display: block;
    height: 40px;
    width: auto;
    transition: transform .4s var(--ease-spring);
}

.logo,
.intro-logo {
    clip-path: circle(46%);
}

.brand:hover .logo {
    transform: rotate(-6deg) scale(1.08);
}

/* ===== Troca de tema: círculo que se expande a partir do botão ===== */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2;
}

.trocando-tema *,
.trocando-tema *::before,
.trocando-tema *::after {
    transition: none !important;
}

nav {
    display: flex;
    gap: 36px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

nav a {
    position: relative;
    padding-block: 6px;
    transition: transform .35s var(--ease-out);
}

nav a:hover {
    transform: translateY(-2px);
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .5s var(--ease-out);
}

nav a:hover::after,
nav a.ativo::after {
    transform: scaleX(1);
    transform-origin: left;
}

#tema {
    justify-self: end;
    padding: 9px 14px;
    background: transparent;
    color: var(--texto);
    border: 2px solid var(--texto);
    box-shadow: 3px 3px 0 var(--borda);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .3s var(--ease-out), color .3s var(--ease-out),
        transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}

#tema:hover {
    background: var(--texto);
    color: var(--bg);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--borda);
}

#tema-texto {
    display: inline-block;
}

.virar {
    animation: virar .5s var(--ease-out);
}

@keyframes virar {
    from {
        transform: rotateX(90deg);
        opacity: 0;
    }

    to {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

/* ===== Hero ===== */
#inicio {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .82fr);
    align-items: center;
    gap: 60px;
    min-height: 700px;
}

.funcao {
    margin: 38px 0 18px;
    font: 800 16px 'Barlow Condensed', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.intro {
    max-width: 520px;
    color: var(--cinza);
    font-size: 15px;
    line-height: 1.8;
}

.btn {
    display: inline-block;
    margin: 30px 12px 0 0;
    padding: 14px 22px;
    border: 2px solid var(--texto);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out),
        background-size .45s var(--ease-out), color .3s var(--ease-out);
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 #6b6b6b;
}

.btn:not(.btn-cheio) {
    background: linear-gradient(var(--texto), var(--texto)) no-repeat left center / 0% 100%;
}

.btn:not(.btn-cheio):hover {
    background-size: 100% 100%;
    color: var(--bg);
}

.btn-cheio {
    background: #d9d9d9;
    color: #0d0d0d;
    border-color: #d9d9d9;
    animation: pulso 2.4s infinite;
}

.btn-cheio:hover {
    animation: none;
}

@keyframes pulso {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(217, 217, 217, .55);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(217, 217, 217, 0);
    }
}

.hero-visual {
    --px: 0;
    --py: 0;
    position: relative;
    width: min(430px, 100%);
    margin-left: auto;
    padding: 20px;
}

.foto {
    position: relative;
    height: 475px;
    padding: 9px;
    background: #d9d9d9;
    box-shadow: 14px 14px 0 var(--borda);
    transform: perspective(900px) rotate(2.5deg) rotateY(calc(var(--px) * 8deg)) rotateX(calc(var(--py) * -8deg));
    animation: foto-entra 1.1s var(--ease-spring) backwards,
        flutuar 5s ease-in-out 1.1s infinite;
}

@keyframes foto-entra {
    from {
        opacity: 0;
        translate: 0 -140px;
        rotate: 25deg;
    }
}

@keyframes flutuar {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -14px;
    }
}

.foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    filter: grayscale(1) contrast(1.12);
    transition: filter .7s var(--ease-out);
    background: repeating-linear-gradient(135deg, #333 0 2px, transparent 2px 12px);
}

.hero-visual:hover .foto img {
    filter: grayscale(0) contrast(1.05);
}

.legenda {
    position: absolute;
    right: -18px;
    bottom: 28px;
    padding: 7px 12px;
    color: #0d0d0d;
    background: #d9d9d9;
    border: 2px solid #0d0d0d;
    font: 800 12px 'Barlow Condensed', sans-serif;
    letter-spacing: 2px;
    transform: rotate(-3deg);
}

.fita {
    position: absolute;
    z-index: 3;
    width: 96px;
    height: 30px;
    background: rgba(217, 217, 217, .75);
    animation: fita-balanca 3s ease-in-out infinite;
}

.fita-topo {
    top: -13px;
    left: -28px;
    transform: rotate(-25deg);
}

.fita-baixo {
    right: -28px;
    bottom: -8px;
    transform: rotate(-27deg);
    animation-delay: -1.5s;
}

@keyframes fita-balanca {

    0%,
    100% {
        rotate: 0deg;
    }

    50% {
        rotate: 6deg;
    }
}

.sticker {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #0d0d0d;
    background: #d9d9d9;
    border: 3px solid #0d0d0d;
    box-shadow: 4px 4px 0 #6b6b6b;
    font: 900 14px/1 'Barlow Condensed', sans-serif;
    text-align: center;
    animation: sticker-pulsa 3s ease-in-out infinite;
}

@keyframes sticker-pulsa {

    0%,
    100% {
        scale: 1;
    }

    50% {
        scale: 1.08;
    }
}

.sticker-code {
    top: 10px;
    right: -30px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    transform: rotate(10deg);
    translate: calc(var(--px) * 22px) calc(var(--py) * 22px);
}

.sticker-code strong {
    font-size: 18px;
}

.sticker-code small {
    font-size: 8px;
    letter-spacing: 2px;
}

.sticker-ready {
    bottom: 2px;
    left: -30px;
    width: 96px;
    height: 70px;
    font-size: 19px;
    font-style: italic;
    transform: rotate(-8deg);
    translate: calc(var(--px) * -18px) calc(var(--py) * -18px);
    animation-delay: -1.5s;
}

.foto,
.sticker {
    will-change: transform, translate;
}

/* ===== Cabeçalho das seções ===== */
.cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 52px;
}

.cabecalho>p {
    max-width: 320px;
    color: var(--cinza);
    font-size: 14px;
    line-height: 1.6;
    text-align: right;
}

.grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

/* ===== Projetos ===== */
.projeto {
    position: relative;
    overflow: hidden;
    background: var(--superficie);
    border: 2px solid var(--texto);
    box-shadow: 6px 6px 0 var(--borda);
    transition: box-shadow .4s var(--ease-out), background .4s var(--ease-out),
        border-color .4s var(--ease-out);
}

.projeto:hover {
    box-shadow: 10px 12px 0 var(--borda);
}

.projeto-arte {
    position: relative;
    height: clamp(180px, 22vw, 230px);
    overflow: hidden;
    padding-top: 28px;
    background-color: #111;
    background-image: repeating-linear-gradient(135deg, #333 0 2px, transparent 2px 12px);
}

.projeto-arte::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 2;
    height: 28px;
    background:
        radial-gradient(circle 4px at 14px 50%, #8a8a8a 96%, transparent),
        radial-gradient(circle 4px at 28px 50%, #6b6b6b 96%, transparent),
        radial-gradient(circle 4px at 42px 50%, #4d4d4d 96%, transparent),
        #0d0d0d;
    border-bottom: 1px solid #2a2a2a;
}

.projeto-arte img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
    transition: transform .7s var(--ease-out), filter .6s var(--ease-out);
}

.projeto:hover .projeto-arte img {
    transform: scale(1.12);
    filter: none;
}

.arte-contida {
    background: #f8f7f2;
}

.arte-contida img {
    object-fit: contain;
    padding: 22px;

}




.numero {
    position: absolute;
    inset: 0 14px auto auto;
    z-index: 3;
    display: flex;
    align-items: center;
    height: 28px;
    color: #999;
    font-size: 11px;
    letter-spacing: 2px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
}



.projeto::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
            color-mix(in srgb, var(--texto) 12%, transparent), transparent 70%);
    transition: opacity .4s var(--ease-out);
}

.projeto:hover::after {
    opacity: 1;
}

.projeto-corpo {
    position: relative;
    padding: 24px 22px 22px;
}

.projeto-corpo::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--texto);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .6s var(--ease-out);
}

.projeto:hover .projeto-corpo::before {
    transform: scaleX(1);
}

.projeto-corpo h3 {
    margin-bottom: 8px;
    font-size: clamp(22px, 2.2vw, 28px);
    line-height: 1;
}

.projeto-corpo>p {
    min-height: 66px;
    margin-bottom: 18px;
    color: var(--cinza);
    font-size: 13px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--borda);
    transition: background .25s var(--ease-out), color .25s var(--ease-out);
}

.tag:hover {
    background: var(--texto);
    color: var(--bg);
}

.acoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--borda);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.acoes span {
    cursor: default;
    color: var(--cinza);
}

.acoes a {
    padding: 7px 12px;
    border: 1px solid var(--texto);
    transition: background .25s var(--ease-out), color .25s var(--ease-out);
}

.acoes a:hover {
    background: var(--texto);
    color: var(--bg);
}

.escrevendo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 12px;
}

.escrevendo h3 {
    font-size: clamp(30px, 4.4vw, 56px);
    line-height: .95;
    letter-spacing: -.02em;
}

/* ===== Selo de status do projeto ===== */
.status {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 3;
    padding: 4px 10px;
    border: 2px solid #0d0d0d;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, .45);
    font: 900 11px 'Barlow Condensed', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: rotate(-4deg);
    transition: transform .35s var(--ease-spring);
    pointer-events: none;
}

.projeto:hover .status {
    transform: rotate(2deg) scale(1.06);
}

.status-pronto {
    color: #063a1c;
    background: #7ee2a8;
}

.status-beta {
    color: #3a2a00;
    background: #ffd166;
}

.status-dev {
    color: #f7f7f5;
    background: #5b6bff;
}

body.claro .status-pronto {
    background: #4fcb86;
}

body.claro .status-beta {
    background: #f0b429;
}

body.claro .status-dev {
    background: #3f4fe0;
}

/* ===== Diplomas ===== */
.cert-section {
    padding: var(--secao-y-cert) 0;
    background: var(--elevado);
    clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%);
    transition: background .4s var(--ease-out);
}

.cert-section .cabecalho {
    align-items: center;
}

.selo-aprovado {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    color: #0d0d0d;
    background: #d9d9d9;
    border: 3px dashed #0d0d0d;
    border-radius: 50%;
    box-shadow: 4px 4px 0 #6b6b6b;
    transform: rotate(12deg);
    font: italic 900 20px 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    animation: balanco 3.5s ease-in-out infinite;
}

@keyframes balanco {

    0%,
    100% {
        transform: rotate(8deg) scale(1);
    }

    50% {
        transform: rotate(16deg) scale(1.06);
    }
}

.certificado {
    position: relative;
    min-height: 235px;
    padding: 20px;
    overflow: hidden;
    color: #0d0d0d;
    background: #d9d9d9;
    border: 3px solid #0d0d0d;
    box-shadow: 6px 6px 0 #6b6b6b;
    transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}

.certificado:hover {
    transform: translateY(-10px) rotate(-1.5deg);
    box-shadow: 12px 14px 0 #6b6b6b;
}

.certificado:nth-child(even):hover {
    transform: translateY(-10px) rotate(1.5deg);
}

.certificado::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid #6b6b6b;
    pointer-events: none;
}

.certificado::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    z-index: 3;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}

.certificado:hover::before {
    animation: brilho .9s var(--ease-out);
}

@keyframes brilho {
    to {
        left: 130%;
    }
}

.cert-topo,
.cert-rodape {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.selo {
    position: absolute;
    z-index: 2;
    top: 57px;
    right: 24px;
    display: grid;
    place-items: center;
    width: 57px;
    height: 57px;
    color: #d9d9d9;
    background: #1f1f1f;
    border-radius: 50%;
    outline: 2px dashed #1f1f1f;
    outline-offset: 4px;
    transform: rotate(8deg) scale(1);
    transition: transform .8s var(--ease-spring);
    font: 900 18px 'Barlow Condensed', sans-serif;
}

.certificado:hover .selo {
    transform: rotate(368deg) scale(1.15);
}

.cert-tipo {
    position: relative;
    z-index: 1;
    margin: 52px 0 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.certificado h3 {
    position: relative;
    z-index: 1;
    width: 75%;
    min-height: 58px;
    margin-bottom: 28px;
    font-size: clamp(22px, 2.2vw, 27px);
    line-height: .95;
}

.cert-rodape {
    padding-top: 12px;
    border-top: 1px solid #6b6b6b;
}

/* ===== Contato ===== */
.contato-grid {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: 100px;
}

.contato-grid h2 {
    margin-bottom: 31px;
}

.texto {
    max-width: 410px;
    margin-bottom: 31px;
    color: var(--cinza);
    font-size: 13px;
    line-height: 1.8;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.links a {
    padding: 9px 14px;
    border: 1px solid var(--borda);
    font-size: 11px;
    font-weight: 700;
    transition: background .25s var(--ease-out), color .25s var(--ease-out),
        transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}

.links a:hover {
    background: var(--texto);
    color: var(--bg);
    transform: translateY(-4px) rotate(-2deg);
    box-shadow: 4px 4px 0 var(--borda);
}

form {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px;
    background: var(--superficie);
    border: 2px solid var(--texto);
    box-shadow: 8px 8px 0 var(--borda);
    transform: rotate(.6deg);
    transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out),
        background .4s var(--ease-out), color .4s var(--ease-out),
        border-color .4s var(--ease-out);
}

form:hover,
form:focus-within {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: 14px 14px 0 var(--borda);
}

form::before {
    content: '✉';
    position: absolute;
    top: -22px;
    right: 26px;
    display: grid;
    place-items: center;
    width: 54px;
    height: 62px;
    color: #0d0d0d;
    background: #d9d9d9;
    border: 3px dashed #0d0d0d;
    font-size: 24px;
    transform: rotate(6deg);
    animation: selo-postal 4s ease-in-out infinite;
}

@keyframes selo-postal {

    0%,
    100% {
        transform: rotate(6deg);
    }

    50% {
        transform: rotate(-4deg) translateY(-3px);
    }
}

.linha {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.campo {
    display: flex;
    flex-direction: column;
}

label {
    margin: 14px 0 8px;
    font: 800 12px 'Barlow Condensed', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: transform .4s var(--ease-out);
}

label:has(+ input:focus),
label:has(+ textarea:focus) {
    transform: translateX(4px);
}

input,
textarea {
    padding: 13px 14px;
    background: var(--bg);
    color: var(--texto);
    border: 1px solid var(--borda);
    font: inherit;
    font-size: 13px;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='white' stroke='black' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") 4 27, text;
    transition: background .4s var(--ease-out), color .4s var(--ease-out),
        border-color .3s var(--ease-out), transform .3s var(--ease-out),
        box-shadow .3s var(--ease-out);
}

input:hover,
textarea:hover {
    border-color: var(--texto);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--texto);
    box-shadow: 3px 3px 0 var(--borda);
    transform: translate(-2px, -2px);
}

textarea {
    resize: vertical;
    padding: 0 14px;
    line-height: 28px;
    background-image: repeating-linear-gradient(transparent 0 27px, var(--borda) 27px 28px);
    background-attachment: local;
}

form button {
    align-self: flex-start;
    margin-top: 24px;
    padding: 14px 24px;
    background: #d9d9d9;
    color: #0d0d0d;
    border: 2px solid #d9d9d9;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .3s var(--ease-out), color .3s var(--ease-out),
        border-color .3s var(--ease-out), transform .25s var(--ease-out),
        box-shadow .25s var(--ease-out);
}

form button span:not(.onda) {
    display: inline-block;
    transition: transform .35s var(--ease-out);
}

form button:hover {
    background: var(--bg);
    color: var(--texto);
    border-color: var(--texto);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--borda);
}

form button:hover span:not(.onda) {
    transform: translateX(6px);
}

.voando {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 48px;
    pointer-events: none;
}
.form-status {
    min-height: 1.4em;
    margin-top: 14px;
    color: var(--cinza);
    font-size: 12px;
}
.form-status.erro { color: #ff6b6b; }

form button:disabled {
    opacity: .6;
    cursor: wait;
}

/* ===== Footer ===== */
footer {
    background: var(--superficie);
    border-top: 1px solid var(--borda);
    transition: background .4s var(--ease-out), border-color .4s var(--ease-out);
}

footer .conteudo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 110px;
}

footer p {
    color: var(--cinza);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
}

.rolling {
    padding: 8px 18px;
    color: #0d0d0d;
    background: #d9d9d9;
    border: 2px solid #0d0d0d;
    border-radius: 45%;
    font: 900 10px 'Barlow Condensed', sans-serif;
    letter-spacing: 1.5px;
    transform: rotate(-4deg);
    transition: transform .4s var(--ease-spring);
}

.rolling:hover {
    transform: rotate(4deg) scale(1.1);
}

/* ===== Onda ao clicar nos botões ===== */
button,
.btn,
.links a {
    position: relative;
    overflow: hidden;
}

.onda {
    position: absolute;
    border-radius: 50%;
    background: currentColor;
    opacity: .35;
    transform: scale(0);
    pointer-events: none;
    animation: onda .7s var(--ease-out);
}

@keyframes onda {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

button:active,
.btn:active,
.links a:active {
    transform: scale(.95);
}

/* ===== Entrada ao rolar a página ===== */
.revelar {
    opacity: 0;
}

.revelar.visivel {
    animation: surgir .8s var(--ease-out) forwards;
    animation-delay: var(--atraso, 0s);
}

@keyframes surgir {
    from {
        opacity: 0;
        translate: 0 50px;
    }

    to {
        opacity: 1;
        translate: 0 0;
    }
}

form.revelar.visivel {
    animation-name: carta;
    animation-duration: 1s;
}

@keyframes carta {
    from {
        opacity: 0;
        translate: 0 90px;
        rotate: -5deg;
    }

    to {
        opacity: 1;
        translate: 0 0;
        rotate: 0deg;
    }
}

/* ===== Responsivo: telas grandes (mantém) ===== */
@media (min-width: 1400px) {
    .conteudo {
        width: min(1280px, calc(100% - 64px));
    }

    section {
        padding: 130px 0;
    }

    .cert-section {
        padding: 155px 0 175px;
    }
}

/* ===== Responsivo: notebooks pequenos ===== */
@media (max-width: 1100px) {
    .conteudo {
        width: calc(100% - 40px);
    }

    #inicio {
        gap: 40px;
        min-height: auto;
        padding-top: 40px;
    }

    .hero-visual {
        width: min(380px, 100%);
        padding: 16px;
    }

    .foto {
        height: 420px;
    }

    .contato-grid {
        gap: 60px;
    }

    .sticker-code {
        right: -20px;
    }

    .sticker-ready {
        left: -20px;
    }
}

/* ===== Responsivo: tablets ===== */
@media (max-width: 900px) {
    h1 {
        font-size: clamp(48px, 9vw, 84px);
    }

    h2 {
        font-size: clamp(38px, 7.5vw, 72px);
    }

    h1 .contorno {
        margin-left: 32px;
    }

    nav {
        gap: 24px;
        font-size: 11px;
    }

    .topbar {
        min-height: 70px;
        padding: 0 20px;
    }

    .cabecalho {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .cabecalho>p {
        text-align: left;
        max-width: 100%;
    }

    .cert-section .cabecalho {
        align-items: flex-start;
        position: relative;
    }

    .selo-aprovado {
        position: absolute;
        top: 0;
        right: 0;
        width: 92px;
        height: 92px;
        font-size: 16px;
    }

    #inicio {
        grid-template-columns: minmax(0, 1fr);
        gap: 70px;
        text-align: left;
    }

    .hero-visual {
        width: min(420px, 92%);
        margin: 0 auto;
        padding: 12px;
    }

    .foto {
        height: 460px;
    }

    .sticker-code {
        right: -18px;
    }

    .sticker-ready {
        left: -18px;
    }

    .contato-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

/* ===== Responsivo: celular ===== */
@media (max-width: 800px) {
    :root {
        --secao-y: 64px;
        --secao-y-cert: 80px;
    }

    .conteudo {
        width: calc(100% - 32px);
    }

    nav {
        display: none;
    }

    .topbar {
        grid-template-columns: 1fr auto auto;
        gap: 10px;
        padding: 14px 16px;
        min-height: 64px;
    }

    .logo {
        height: 34px;
    }

    .brand {
        font-size: 18px;
    }

    #tema {
        padding: 8px 12px;
        font-size: 11px;
    }

    h1 {
        font-size: clamp(44px, 12vw, 72px);
        line-height: .85;
    }

    h1 .contorno {
        margin-left: 16px;
        -webkit-text-stroke-width: 1.5px;
    }

    h2 {
        font-size: clamp(34px, 10vw, 60px);
        line-height: .85;
    }

    .contorno {
        -webkit-text-stroke-width: 1.5px;
    }

    section {
        padding: var(--secao-y) 0;
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: 2px;
        margin-bottom: 14px;
    }

    .funcao {
        font-size: 14px;
        margin: 24px 0 14px;
    }

    .intro {
        font-size: 14px;
    }

    .btn {
        padding: 12px 18px;
        font-size: 11px;
        margin: 24px 8px 0 0;
    }

    .hero-visual {
        width: 88%;
        padding: 8px;
    }

    .foto {
        height: 380px;
        box-shadow: 10px 10px 0 var(--borda);
    }

    .fita {
        width: 76px;
        height: 24px;
    }

    .fita-topo {
        top: -10px;
        left: -20px;
    }

    .fita-baixo {
        right: -20px;
        bottom: -6px;
    }

    .sticker-code {
        width: 76px;
        height: 76px;
        top: 6px;
        right: -12px;
    }

    .sticker-code strong {
        font-size: 14px;
    }

    .sticker-ready {
        width: 78px;
        height: 58px;
        font-size: 15px;
        left: -12px;
        bottom: 0;
    }

    .legenda {
        right: -10px;
        bottom: 18px;
        font-size: 11px;
        padding: 6px 10px;
    }

    .grade {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .projeto-arte {
        height: 200px;
    }

    .projeto-corpo {
        padding: 20px 18px 18px;
    }

    .projeto-corpo h3 {
        font-size: 24px;
    }

    .projeto-corpo>p {
        min-height: 0;
    }

    .escrevendo {
        padding: 20px 4px 0;
    }

    /* selo de status no mobile */
    .status {
        font-size: 10px;
        padding: 3px 8px;
        right: 10px;
        bottom: 10px;
        letter-spacing: 1px;
    }

    .cert-section {
        clip-path: polygon(0 1.5%, 100% 0, 100% 98.5%, 0 100%);
    }

    .certificado {
        min-height: 210px;
    }

    .certificado h3 {
        font-size: 24px;
        min-height: 0;
        margin-bottom: 22px;
    }

    .selo {
        top: 50px;
        right: 18px;
    }

    .contato-grid {
        gap: 48px;
    }

    .contato-grid h2 {
        margin-bottom: 22px;
    }

    .texto {
        margin-bottom: 22px;
    }

    form {
        padding: 22px 18px;
        box-shadow: 6px 6px 0 var(--borda);
    }

    form::before {
        width: 44px;
        height: 52px;
        font-size: 20px;
        right: 18px;
        top: -18px;
    }

    .linha {
        grid-template-columns: 1fr;
        gap: 0;
    }

    form button {
        align-self: stretch;
        text-align: center;
    }

    footer .conteudo {
        flex-direction: column;
        align-items: flex-start;
        padding-block: 32px;
        gap: 16px;
    }

    footer p {
        text-align: left;
    }
}

/* ===== Responsivo: celular muito pequeno ===== */
@media (max-width: 400px) {
    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 30px;
    }

    .hero-visual {
        width: 94%;
    }

    .foto {
        height: 320px;
    }

    .sticker-code {
        width: 64px;
        height: 64px;
        right: -8px;
    }

    .sticker-code strong {
        font-size: 12px;
    }

    .sticker-code small {
        font-size: 7px;
    }

    .sticker-ready {
        width: 68px;
        height: 50px;
        font-size: 13px;
        left: -8px;
    }

    .acoes {
        font-size: 10px;
    }

    .acoes a {
        padding: 6px 10px;
    }
}

/* ===== Melhora toque em dispositivos touch ===== */
@media (hover: none) {
    .projeto:hover .projeto-arte img {
        transform: none;
    }

    .projeto:hover::after {
        opacity: 0;
    }

    .projeto:hover .projeto-corpo::before {
        transform: scaleX(0);
    }

    .hero-visual:hover .foto img {
        filter: grayscale(1) contrast(1.12);
    }

    /* feedback de toque também no Sábios */
    .projeto:active .arte-contida img {
        transform: scale(1.03);
        filter: none;
    }

    /* no toque, o selo de status não muda (o :hover não existe) */
    .projeto:hover .status {
        transform: rotate(-4deg) scale(1);
    }
}

/* ===== Quem prefere menos movimento no sistema ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body,
    .intro-logo {
        transition: none;
        animation: none;
    }

    :where(header, main, footer) *,
    :where(header, main, footer) *::before,
    :where(header, main, footer) *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }

    .revelar {
        opacity: 1 !important;
    }

    .titulo-anima:not(.visivel) .letra {
        opacity: 1;
    }

    /* o carrossel anda sempre (é lento e decorativo) */
    .trilha {
        animation: carrossel 40s linear infinite !important;
    }

    .carrossel:hover .trilha {
        animation-play-state: paused !important;
    }
}

/* ===== Hero: coluna da foto + carrossel ===== */
.hero-lado {
    width: min(430px, 100%);
    margin-left: auto;
}

/* o tamanho agora é controlado pelo .hero-lado */
.hero-lado .hero-visual {
    width: 100%;
    margin: 0;
}

/* ===== Botão de currículo ===== */
.seta-baixo {
    display: inline-block;
    margin-left: 4px;
    transition: transform .35s var(--ease-out);
}

.btn-download:hover .seta-baixo {
    transform: translateY(4px);
}

/* ===== Carrossel de linguagens ===== */
.carrossel {
    margin: 6px 20px 0;
    padding-block: 14px;
    overflow: hidden;
    border-block: 2px solid var(--texto);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.trilha {
    display: flex;
    width: max-content;
    animation: carrossel 30s linear infinite;
    will-change: transform;
}

.carrossel:hover .trilha {
    animation-play-state: paused;
}

.grupo {
    display: flex;
    flex-shrink: 0;
}

.tec {
    display: flex;
    align-items: center;
    padding-left: 20px;
    color: var(--texto);
    font: 800 20px 'Barlow Condensed', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .3s var(--ease-out);
}

/* o separador entre uma tecnologia e outra */
.tec::after {
    content: '✦';
    margin-left: 20px;
    color: var(--cinza);
    font-size: 10px;
}

/* passou o mouse: a palavra fica só com contorno, igual aos títulos */
.tec:hover {
    color: transparent;
    -webkit-text-stroke: 1px var(--texto);
}

/* anda metade da trilha (= um grupo inteiro) e recomeça sem pulo */
@keyframes carrossel {
    to { transform: translateX(-50%); }
}

/* ajustes por tamanho de tela */
@media (max-width: 1100px) {
    .hero-lado { width: min(380px, 100%); }
    .carrossel { margin-inline: 16px; }
}

@media (max-width: 900px) {
    .hero-lado { width: min(420px, 92%); margin: 0 auto; }
    .carrossel { margin-inline: 12px; }
}

@media (max-width: 800px) {
    .hero-lado { width: 88%; }
    .carrossel { margin-inline: 8px; }
    .tec { font-size: 17px; padding-left: 16px; }
    .tec::after { margin-left: 16px; }
}

@media (max-width: 400px) {
    .hero-lado { width: 94%; }
}

/* ===== Hero: o carrossel não pode alargar as colunas ===== */
.hero-texto,
.hero-lado {
    min-width: 0;
}

/* ===== Foco visível (quem navega com a tecla Tab) ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px dashed var(--texto);
    outline-offset: 4px;
}

.acoes a:focus-visible,
.links a:focus-visible {
    outline-offset: 2px;
}

/* ===== Intro: pula quando já foi vista nesta sessão ===== */
.sem-intro #intro {
    display: none;
}

.sem-intro body.carregando {
    overflow-x: hidden;
    overflow-y: auto;
}

/* ===== Aviso no lugar do botão (projeto ainda sem repositório) ===== */
.acoes .em-breve {
    padding: 7px 12px;
    border: 1px dashed var(--cinza);
    line-height: 1.4;
}

/* ===== Evita rolagem/zoom lateral no celular =====
   A foto do topo tem fita, sombra e leve rotação que passam um pouco da
   borda da tela. Sem isso, o navegador do celular "afasta" a página pra
   caber tudo e a tela de carregamento (que é fixa) fica torta. */
html,
body {
    overflow-x: clip;
}

/* ===== Foco visível nos campos do formulário ===== */
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--texto);
    outline-offset: 3px;
}

/* ===== Link "pular para o conteúdo" (aparece só ao navegar com Tab) ===== */
.pular {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 200;
    padding: 10px 14px;
    color: #0d0d0d;
    background: #d9d9d9;
    border: 2px solid #0d0d0d;
    font: 800 12px 'DM Sans', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: translateY(-200%);
}

.pular:focus {
    transform: none;
}

main:focus {
    outline: none;
}

/* ===== Menu mobile ===== */
.menu-toggle {
    display: none;
}

@media (max-width: 800px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 40px;
        height: 36px;
        padding: 0;
        background: transparent;
        color: var(--texto);
        border: 2px solid var(--texto);
        box-shadow: 3px 3px 0 var(--borda);
        cursor: pointer;
    }

    .menu-toggle span:not(.onda) {
        display: block;
        width: 18px;
        height: 2px;
        background: currentColor;
        transition: transform .35s var(--ease-out), opacity .25s var(--ease-out);
    }

    .menu-toggle.aberto span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.aberto span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.aberto span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* o menu vira uma gaveta logo abaixo da barra */
    nav.active {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 8px 16px 16px;
        background: var(--bg);
        border-bottom: 1px solid var(--borda);
        font-size: 13px;
    }

    nav.active a {
        padding: 14px 0;
        border-bottom: 1px solid var(--borda);
    }

    nav.active a:last-child {
        border-bottom: 0;
    }

    nav.active a::after {
        bottom: 6px;
        width: 40px;
    }
}

/* ===== Sobre mim ===== */
.sobre-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 80px;
    align-items: center;
}

.sobre-texto .texto {
    max-width: 480px;
    font-size: 14px;
}

.sobre-texto .texto + .texto {
    margin-top: -12px;
}

.sobre-texto .btn {
    margin-top: 8px;
}

.sobre-card {
    padding: 28px;
    background: var(--superficie);
    border: 2px solid var(--texto);
    box-shadow: 8px 8px 0 var(--borda);
    transform: rotate(-.8deg);
    transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out),
        background .4s var(--ease-out), border-color .4s var(--ease-out);
}

.sobre-card:hover {
    transform: rotate(0deg) translateY(-6px);
    box-shadow: 14px 14px 0 var(--borda);
}

.sobre-numeros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.sobre-numeros div {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px 12px;
    border: 1px solid var(--borda);
}

.sobre-numeros strong {
    font: 900 clamp(34px, 4vw, 48px)/1 'Barlow Condensed', sans-serif;
    letter-spacing: -.02em;
}

.sobre-numeros span {
    margin-top: 6px;
    color: var(--cinza);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.sobre-lista {
    list-style: none;
}

.sobre-lista li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--borda);
}

.sobre-lista b {
    font: 800 18px 'Barlow Condensed', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sobre-lista span {
    color: var(--cinza);
    font-size: 12px;
    text-align: right;
}

@media (max-width: 900px) {
    .sobre-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
    }
}

@media (max-width: 800px) {
    .sobre-card {
        padding: 20px 16px;
        box-shadow: 6px 6px 0 var(--borda);
    }

    .sobre-numeros {
        gap: 8px;
    }

    .sobre-numeros div {
        padding: 12px 8px;
    }

    .sobre-numeros span {
        letter-spacing: 1px;
    }

    .sobre-lista li {
        flex-direction: column;
        gap: 2px;
    }

    .sobre-lista span {
        text-align: left;
    }
}

/* telas bem estreitas: cada número vira uma linha (número à esquerda, nome à direita) */
@media (max-width: 480px) {
    .sobre-numeros {
        grid-template-columns: 1fr;
    }

    .sobre-numeros div {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        padding: 12px 14px;
    }

    .sobre-numeros span {
        margin-top: 0;
        letter-spacing: 2px;
    }
}
